I am creating an OData service with WCF Data Services using an EDMX. How can I create a computed property for an entity type, so that its value gets computed in the service
The solution I found is to use Entity Framework Code First instead of an EDMX. It allows you to create computed properties just by creating standard properties in code.
Here is an example:
public class Person
{
public String FirstName { get; set; }
public String LastName { get; set; }
public String FullName
{
get { return FirstName + " " + LastName; }
}
}