domaindatasource

silverlight 4 RIA update item in domaindatasource only updates after refresh

久未见 提交于 2019-12-12 21:51:23
问题 I have created a silverlight app and have a listbox that is populated using a domaindatasource. I have created a button that takes the selected list item and updates a field (in my case its called IsDeleted) my domain service looks like this public IQueryable<Employee> GetEmployees(int storeID) { return this.ObjectContext.Employees.Where(e=>(e.StoreID==storeID)&&(e.IsDeleted==false)); } In my button event I am doing this EmployeeRecord.IsDeleted = true; dsEmployee.SubmitChanges(); The

Silverlight DomainContext load with two separate DomainDataSources

烈酒焚心 提交于 2019-12-11 16:49:03
问题 I have a confusion regarding DataContext which i would like someone to confirm or comment please. In plain English, I believe a DataContext is a container which can be filled with entities upon load. e.g. I have two entities named Customers and Orders . I now declare a new DomainContext var ctx = new MyWebServices.MyDomainContext(); I load Customers in a DomainDataSource like this: DomainDataSource ddsCustomer = new DomainDataSource(); ddsCustomer.context = ctx; ddsCustomer.query = ctx