ria

Do I need to call my domain service's context.SaveChanges after adding a new entity?

99封情书 提交于 2019-12-23 12:08:37
问题 I am building an application based on Ria Services. Amongst the default methods that were built by the Visual Studio Wizard, I can see the ones that should insert and persist new data. For example: public void InsertCustomer(Customer customer) { if ((customer.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(customer, EntityState.Added); } else { this.ObjectContext.Customers.AddObject(customer); } } However, I don't see any this.ObjectContext

Empty svc file using WCF Ria Services and ADO .NET Data Services

早过忘川 提交于 2019-12-23 03:04:01
问题 I have a WCF RIA project getting my data from an SQL Server 2008 via Entity framework. Everything is going well. However I would like to access data via a windows mobile so, as far as I can understand I have to create an ADO.NET Data Service. My domain service is called BusinessLogicDomainService.cs. Immediately after creating the corresponding BusinessObjectsDataService I write this: public class BusinessObjectsDataService : DataService<BusinessObjectsDomainService> { public static void

WCF RIA Services - Loading multiple entities

大憨熊 提交于 2019-12-22 18:39:09
问题 I'm looking for a pattern to solve the following problem, which I imagine is common. I am using WCF RIA Services to return multiple entities to the client, on initial load. I want both entities to load asyncrhonously, so as not to lock the UI, and I'd like to leverage RIA Services to do this. My solution, below, seems to work. Will I run into problems/limitations with this approach? Is there a better pattern for this? Thanks! //create proxy to Domain Service var proxy = new RIAService.Web

How do I filter related Child Record

烈酒焚心 提交于 2019-12-22 15:50:24
问题 I am using RIA services. I need to select a parent entity ( UnitOccupier ) which has a number of related child entities( UnitOccupierDetails ). I need to filter the child entities to return a single record. How do I do this? var q = from uo in _unitOccupierContext.GetUnitOccupierQuery() where uo.UnitOccupierDetails.???? ---> I cant get to the child properties here Thanks 回答1: You cannot include a filtered child collection of the selected parent. You can only include either the full collection

Converting ESQL to LINQ to Entities. Sort by related entities

蹲街弑〆低调 提交于 2019-12-22 08:29:44
问题 I am using EF + RIA and unfortunately meet some problems with sorting by related entities. For such purpose there is ESQL query that I implemented (found only this solution): var queryESQL = string.Format( @" select VALUE ent from SomeEntities as ent join Attributes as ea ON ea.EntityId = ent.Id where ea.AttributeTypeId = @typeId order by ea.{0} {1}", columnName, descending ? "desc" : "asc"); var query = ObjectContext.CreateQuery<SomeEntity>(queryESQL, new ObjectParameter("typeId",

ExtJS or SmartClient?

青春壹個敷衍的年華 提交于 2019-12-22 05:38:12
问题 I would like your opinion about these two frameworks. I like a lot the features of ExtJS, but recently I saw SmartClient and it seems to be great too, and free (its Client side features) for commercial projects. I tried a little of SmartClient and it seems to be easier than ExtJS, and it has a better documentation tnan ExtJS. BUT.. I didn't work with any of these frameworks and maybe I'm wrong. That's why I would like the opinion of people who has worked with them. And BTW.. how does the

RIA/EF4 Entity property mapped to NOT NULL nvarchar - empty string

爷,独闯天下 提交于 2019-12-21 09:22:12
问题 Background: Entity Framework 4 Silverlight 4 RIA services MSSQL Server 2008 I have an entity that has a String property named Description. In database it maps to the NOT NULL NVARCHAR(200) . Problem: When I try to insert a new row of that entity, this is what I do: MyExampleEntity entity = new MyExampleEntity() { Name = "example", Description = "" // NOTE THIS LINE! }; DatabaseContext db = new DatabaseContext(); db.MyExampleEntities.Add(entity); db.SubmitChanges(); This, however, causes an

What are the pitfalls of using .NET RIA Services in Silverlight?

为君一笑 提交于 2019-12-20 19:36:20
问题 Silverlight can use WCF, Web Services, REST based services, .NET RIA Services, but it seems like Silverlight and .NET RIA Services are preferred most. I want to know if there are any common issues [which can be a show stopper if one goes ahead with this combo] that you have seen in practical implementation of SL with .NET RIA Services. Thanks, Rahul 回答1: Working with metadata (and writing it by yourself) is really pain in the ass. Especially when you need to update your model. RIA tutorial

Wicket vs Vaadin

妖精的绣舞 提交于 2019-12-20 08:24:24
问题 I am torn between Wicket and Vaadin. I am starting a micro-isv and need to make a choice of web framework. I have narrowed down my choices to Wicket and Vaadin. I have used both frameworks and I love them both. however I need to make a choice. If If I choose Vaadin: I wont have to worry much about the look and feel. It comes with nice themes. I will do all my programming in Java which am very good at and wont have to spend time hacking CSS which am not very good at. And most of the components

Any sample on how to use WCF RIA Services in XAML metro app?

雨燕双飞 提交于 2019-12-19 11:38:23
问题 I wonder if someone have tried using WCF RIA Services in XAML based metro application. If you have any blog or sample please share. 回答1: As a matter of fact I did and here's the trick :) I added a " Service Reference " to my WCF service exposing an ADO.NET Entity Framework model. The problem is that in a XAML/C# Metro app, executing the following code fails: SampleEntities ctx = ((App)Application.Current).Context; var query = from p in ctx.Products where p.Name == name select p; foreach