I have an interface
public interface ITask { IPart Part { get; set; } } When I implement this interface the compiler will be happy with
public virtual IPart Part { get; set; } or
public IPart Part { get; set; } However EF needs the property to be virtual as explained here.
I keep forgetting to implement it the right way. Is there some way I can ensure that it must be?
Note I complete the interface as follows;
public virtual IPart Part { get { return TemplatePart; } set { TemplatePart = (TemplatePart)value; } } Is the "virtual" actually irrelevant because I am not declaring a navigation property ?