【问题标题】:Eager loading via user defined function in Entity Framework 4.1通过 Entity Framework 4.1 中的用户定义函数进行热切加载
【发布时间】:2012-10-03 08:04:34
【问题描述】:

我正在使用实体框架 4.1。 Fluent API 将我的模型映射到预定义的数据库。有没有办法通过存储过程或用户定义的函数来使用复杂属性的急切初始化? 例如:

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; }
}

假设我在数据库中有一个用户定义的函数,它将 Car Id 作为输入并返回零件列表。有没有机会用它来做EF?

谢谢。

【问题讨论】:

    标签: c# entity-framework eager-loading user-defined-functions


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-27
      • 1970-01-01
      • 1970-01-01
      • 2011-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多