I have a Silverlight 4 application with EntityFramework as a data layer.
There are two objects: Customer and Products. When I get the client from the database, the related products are also read, as I added the associated "Include" attribute to the client metadata and the Include method is called in the request request:
public IQueryable<customer> GetCustomerSetById(int customerId)
{
return this.ObjectContext.CustomerSet
.Include(o => o.Products)
.Where(o => o.Id = customerId);
}
The problem is that when I change any property in the client product, I get this exception:
This EntitySet type "MyApp.Web.Models.Product" does not support the "Change" operation.
But everything works if I directly read customer products, for example. not through the customer object (CustomerContext), but through the product one (ProductContext).
Also in the product object is the property IsReadOnly = true.
UPDATE:
CUD, Insert, Update Delete. , , .
?