Can I use an Interface as a property with Entity Framework?
问题 I have the following class which is a model for a database table: public class User : IUser { internal int Id { get; set; } public string Name { get; set; } public string Email { get; set; } public ITest TestData { get; set; } } When I run Update-Database command, it throws an error: The property User.TestData is of an interface type ( ITest ). If it is a navigation property manually configure the relationship for this property by casting it to a mapped entity type How and where can I