I’m using Entity framework 4.1. Fluent API to map my model to pre-defined database. Is there any way to use eager initialization of complex properties via stored procedures or user defined functions? For example:
public class Car
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Model Model {get;set}
public int Year {get;set;}
public ICollection<Part> Parts { get; set; }
}
Let’s say I have a user defined function in the database that takes Car Id as an input and returns list of parts. Is there any chance to make EF using it?
Thanks.