Question

I'm creating a application using entity framework code-first and i'm facing some problems with the limitations of EF while following the interface segration principle. Part of application model architecture in UML

    public interface IProduct
{
    int Id { get; set; }
    ICollection<IProcess> Processes { get; set; }
    ICollection<ILine> Lines { get; set; }
    String Description { get; set; }
    String Number { get; set; }
    String Name { get; set; }
}

Problem is the Processes and Lines property cause it can't figure out which class in the concrete type (I presume).

I know that i could achieve almost the same by using abstract classes. Reason why i haven't just done this is that i find it wrong to change the model because of EF limitations.

What will be the best way to solve this? Any alternative to EF that allows interfaces as navigation property.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top