I’ve got two entities in the entity framework. Now I want to seperate them by putting an Interface of the DAL entity into the Domain.
So the end result would be:
DAL
- Person : IPerson (EF Entity)
- Book : IBook (EF Entity)
Domain
- Interfaces (Folder)
- IPerson
- IBook
- Person (Domain entity)
- Book (Domain entity)
Now the problem is, should my Dal.Person have a virtual Book or IBook?
How should both the DAL.Person, IPerson and Domain.Person look like (give me just really small example for the interfacing)
EF doesn’t support working with interfaces so you cannot have
public virtual IBook ...in yourPersonentity if you want to use it as navigation property handled by EF.