Is there any way in code-first EF 5 to prevent updates on a specific entity/table? We are using EF in a WCF web service. We want updates to occur on one of the main objects, but not on some of the children.
The idea being that if we have a main object like this:
class Person
{
public Address { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
class Address
{
public string City { get; set; }
public string State { get; set; }
}
We would want changes to Person
persisted, but not changes to Address
.