【发布时间】:2016-03-29 09:30:53
【问题描述】:
拥有实体对象的基类我面临循环引用问题和基类依赖角色引入问题,只要我有实体的复合类:
public abstract class Base
{
public int Id {get;set;}
public DateTime CreationTime {get;set;}
public User Creator {get; ste;}
}
public class User : Base
{
public string Name {get;set;}
public Country BirthPlace {get;set;}
// rest of the properties
}
public class Country : Base
{
public string Description {get;set;}
//rest of the properties
}
知道如何克服这个问题吗?
【问题讨论】:
-
您好,如果我的解决方案回答了您的问题,请将问题标记为有用,谢谢 :)
-
谢谢队友做到了:)
标签: entity-framework superclass circular-reference