我已经有两个完整的类(EF域模型),并带有相关的引用(一对多):
public class Foo : IFoo
{
public virtual ICollection<Bar> Bars { get; set; }
}
public class Bar : IBar
{
public virtual Foo Foo { get; set; }
}
我需要通过接口使用它们才能实现DI。这样的接口实现显然不起作用:
public interface IFoo
{
ICollection<IBar> Bars { get; set; }
}
public interface IBar
{
IFoo Foo { get; set; }
}
您能否请您以正确的方式提出建议?
素胚勾勒不出你
相关分类