【发布时间】:2014-11-01 03:42:05
【问题描述】:
我在 EF 6.x 中使用了以下 POCO 类。
我的问题:为什么“博客”实体下的“帖子”的导航属性声明为虚拟?
public class Blog
{
public int BlogId { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public string Tags { get; set; }
public virtual ICollection<Post> Posts { get; set; }
}
【问题讨论】:
标签: entity-framework navigation-properties