I have a web service that uses the Entity Framework for storage and provides a public API for CRUD operations.
If I have an object, such as a User, which has a 1 to many relationship with the Car object, how can I easily return a user instance that looks like this to my GetUser web service method (int userId):
public class User{
string Id;
IEnumberable<Car> Cars;
}
Does this work by default within an entity because I assume that the Cars property is lazy when used on the server side.
source
share