wcf-ria-services

WCF RIA Services - returning custom class of two already defined classes

我与影子孤独终老i 提交于 2019-12-24 01:39:26
问题 I have a Silverlight / WCF RIA Services application that uses EF 4. Currently, there is a domain service that returns two types of classes, OrderItem and Event. I'd like to create a class that contains both of these items for easier manipulation of the data at the XAML level. Here is what the class that combines the two classes looks like: [Serializable] [DataContract] public partial class EventOrderItem { [Key] [DataMember] public string EventOrderItemKey { get { return Event.EventID

Changing association property (EntityCollection) don't rise PropertyChanged

我只是一个虾纸丫 提交于 2019-12-24 00:07:41
问题 I want to bind some column data of readonly DataGrid to Association property of Entity through Converter (convert collection from this association property to string). When I try to add/remove elements from collection, binding don't fire. PropertyChanged also, don't rising. contractPosition.PropertyChanged += (s, e2) => { a = 0;//don't fire }; contractPosition.ContractToOrderLinks.Remove(link); Here is the fragment of contractPosition Entity (generated by EF4): [Association("ContractPosition

Linq 2 SQL , insert Objects with associated child objects List into database , Silverlight RIA

梦想与她 提交于 2019-12-23 18:37:12
问题 I am doing small Silverlight app which will allow users to Create orders. I have created Linq 2 SQL dbml and dragged there my database tables, "Orders" and "OrderLines" , there is an association between them. Order.ID ~ OrderLine.OrderID, so then i created DomainService for my tables, where i enabled client access, it generated for me the methods, Insert,Update,Delete,Get, for Orders and OrderLines, now i am creating New Order from my silverlight application, the usercontrol looks like this:

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

LightSwitch - bulk-loading all requests into one using a domain service

别等时光非礼了梦想. 提交于 2019-12-23 04:23:57
问题 I need to group some data from a SQL Server database and since LightSwitch doesn't support that out-of-the-box I use a Domain Service according to Eric Erhardt's guide. However my table contains several foreign keys and of course I want the correct related data to be shown in the table (just doing like in the guide will only make the key values show). I solved this by adding a Relationship to my newly created Entity like this: And my Domain Service class looks like this: public class

How do I increase the amount of data I can pass back from a RIA Service?

喜你入骨 提交于 2019-12-23 03:11:16
问题 I'm new to WCF, RIA Services, and even Silverlight for the most part. I need to know how to increase the amount of data that I can pass back from a RIA service. I know that I need to create summary lists and I am being smart about how I request data. I can't use paging because I've archetected myself into a corner, and it would be way too much refactoring at this point. I just need to double the limit of data coming back. My requests are fairly small. How can I do this, and also why is this

Why are these asynchronous RIA Service calls executed in serial on the web server?

别来无恙 提交于 2019-12-22 19:37:31
问题 I'm calling the RIA Service method ImportSubcomponentFileSetFiles (which is an Invoke, not Query) twice as follows: foreach (var viewModel in FileSetViewModels.Where(vm => vm.IsSelectedForImport)) { DomainContext.ImportSubcomponentFileSetFiles(viewModel.SubcomponentFileSet.Id, callback => { //... DomainContext.Load(DomainContext.GetSubcomponentFileSetWithStatusQuery(subcomponentFileSetId), LoadBehavior.RefreshCurrent, callback2 => { //... }, true); }, null); } I can see in Fiddler that two

Why are these asynchronous RIA Service calls executed in serial on the web server?

半城伤御伤魂 提交于 2019-12-22 19:37:05
问题 I'm calling the RIA Service method ImportSubcomponentFileSetFiles (which is an Invoke, not Query) twice as follows: foreach (var viewModel in FileSetViewModels.Where(vm => vm.IsSelectedForImport)) { DomainContext.ImportSubcomponentFileSetFiles(viewModel.SubcomponentFileSet.Id, callback => { //... DomainContext.Load(DomainContext.GetSubcomponentFileSetWithStatusQuery(subcomponentFileSetId), LoadBehavior.RefreshCurrent, callback2 => { //... }, true); }, null); } I can see in Fiddler that two

Adding additional entities to a Entity Framework backed Domain Service

拟墨画扇 提交于 2019-12-22 14:09:03
问题 We're investigating using RIA Services (July 09 Preview) to expose parts of an existing EF model. We've added a Domain Service class to our web application and specified the EF model to use and selected a few of the entities we wish to make available via the domain service (some have editing enabled, most do not). We build and everything is great, but if we want to add an additional entity to the domain service how do we do that. Is it a case of delete your current class and re-add and this

Adding additional entities to a Entity Framework backed Domain Service

只愿长相守 提交于 2019-12-22 14:08:48
问题 We're investigating using RIA Services (July 09 Preview) to expose parts of an existing EF model. We've added a Domain Service class to our web application and specified the EF model to use and selected a few of the entities we wish to make available via the domain service (some have editing enabled, most do not). We build and everything is great, but if we want to add an additional entity to the domain service how do we do that. Is it a case of delete your current class and re-add and this