upshot

Binding upshot to a Web API in a different project

那年仲夏 提交于 2019-12-05 15:01:16
I am trying to create a SPA application, to take advantage of upshot and its capabilities. However, the services exposing the data (i.e. the Web API) is in a completely separate project, already hosted on IIS. I would like to bind upshot to that existing API, but from what I can see in the HTML helpers for upshot (v1.0.0.1), you need to pass in the type of the controller that exposes the data, like so: Html.UpshotContext.DataSource(Of ToDoController )(Function(x) x.GetTodoItems()) where ToDoController is the ApiController that exposes the data, defined in the same project. My question is, how

Upshot MVC 4 handling of Date, knockout bindings

我们两清 提交于 2019-12-04 18:02:37
How does upshot.js handles DateTime objects? As it seems its just creating "normal" strings and not creating a real JS date object. All the problems related to JSON date formatting and MVC are discussed here already: Handling dates with Asp.Net MVC and KnockoutJS So even after changing the MVC default JSON formatter to JSON.Net its still not doing an automatic conversion to date. Unfortunately all the bindings must be done "per hand" to create a Date object internally. With the JSON.Net formatted date to new Date(string) approach seems to work ok as the constructor is abel to handle the date

What would make Entity Framework / Upshot believe my object graph “contains cycles”?

↘锁芯ラ 提交于 2019-12-03 14:14:55
问题 I am testing Knockout 2.1.0 and Upshot 1.0.0.2 with Entity Framework 4.3 (Code-First) and am running into the following error: {"Object graph for type 'System.Collections.Generic.HashSet`1[[KnockoutTest.Models.Person, KnockoutTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled."} I am using a fairly typical model for testing with some basic parent-child entities. public class Client { public Client() {

What would make Entity Framework / Upshot believe my object graph “contains cycles”?

感情迁移 提交于 2019-12-03 04:05:20
I am testing Knockout 2.1.0 and Upshot 1.0.0.2 with Entity Framework 4.3 (Code-First) and am running into the following error: {"Object graph for type 'System.Collections.Generic.HashSet`1[[KnockoutTest.Models.Person, KnockoutTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled."} I am using a fairly typical model for testing with some basic parent-child entities. public class Client { public Client() { Projects = new HashSet<Project>(); Persons = new HashSet<Person>(); } [Key] public int ClientId { get; set;

Where can I find Upshot.js examples and documentation?

末鹿安然 提交于 2019-11-29 19:50:44
Steve Sanderson gave a very interesting presentations at Techdays 2012 in the Netherlands. In one of them he presented a library that he used for client-server communication in MVC application: Upshot. I was really amazed how easy it was to use it, so I wanted to download and test it. I found the download link here through NuGet , but I cannot find any documentation. Does anyone have something that works? I would also appreciate the sample code that Steve showed as during presentation. EDIT: I found the online presentation I attended at Techdays. It's soooo much worth seeing. You will get a

MVC 4, Upshot entities cyclic references

扶醉桌前 提交于 2019-11-29 12:52:32
I have a DbDataController which delivers a List of Equipment. public IQueryable<BettrFit.Models.Equipment> GetEquipment() { var q= DbContext.EquipmentSet.OrderBy(e => e.Name); return q; } In my scaffolded view everything looks ok. But the Equipment contains a HashSet member of EquipmentType. I want to show this type in my view and also be able to add data to the EquipmentType collection of Equipment (via a multiselect list). But if I try to include the "EquipmentType" in my linq query it fails during serialisation . public IQueryable<BettrFit.Models.Equipment> GetEquipment() { var q= DbContext

Current status of Upshot.js

被刻印的时光 ゝ 提交于 2019-11-29 03:07:11
I am thinking of using upshot.js along with Knockout in one of my very important projects. I do not see any documentation or any activity around upshot. Before I commit to this decision, is this project still active? If the entire asp.net stack is now open and one can see what is getting committed to repository, why this small library is still not on codeplex or github for community to see? I hope this is still on radar of asp.net team. According to this blog post, Upshot is officially dead: http://www.riaservicesblog.net/Blog/post/WCF-RIA-Services-is-Dead-Long-Live-WCF-RIA-Services.aspx The

Where can I find Upshot.js examples and documentation?

早过忘川 提交于 2019-11-28 15:38:25
问题 Steve Sanderson gave a very interesting presentations at Techdays 2012 in the Netherlands. In one of them he presented a library that he used for client-server communication in MVC application: Upshot. I was really amazed how easy it was to use it, so I wanted to download and test it. I found the download link here through NuGet, but I cannot find any documentation. Does anyone have something that works? I would also appreciate the sample code that Steve showed as during presentation. EDIT: I

MVC 4, Upshot entities cyclic references

牧云@^-^@ 提交于 2019-11-28 06:38:49
问题 I have a DbDataController which delivers a List of Equipment. public IQueryable<BettrFit.Models.Equipment> GetEquipment() { var q= DbContext.EquipmentSet.OrderBy(e => e.Name); return q; } In my scaffolded view everything looks ok. But the Equipment contains a HashSet member of EquipmentType. I want to show this type in my view and also be able to add data to the EquipmentType collection of Equipment (via a multiselect list). But if I try to include the "EquipmentType" in my linq query it

How to upload related entities via MVC4 upshot

只愿长相守 提交于 2019-11-28 02:13:43
问题 I get a simple DTO entity A loaded into my upshot viewmodel which is happily viewable via Knockoutjs. My DTO A contains a List entities. So I can foreach over the elements inside A. again: class A { someprop; List<B> childB; } Class B { somepropB; } So far so good. I can iterated over the data with no problem. But if I change "someprop" inside an instance of A and SaveAll the server will not respond at all. The updateData controlle method is not even invoked. If I clear the childB.Clear()