I am a student making ASP NET Core 3.1.1 WebAPI on top of NorthwindDB. Tables ID properties have unique names. Is there a way to apply generic repository pattern in such case without it becoming too complicated?
public interface IEntity
{
int id {get; set;} //won't work, Id: s have unique names like 'int ProductId'
}
public interface IEntity
{
int ProductId {get; set;} //allows only 'Products' class to inherit
}
public interface IEntity
{
int ProductId {get; set;}
string EmployeeId {get; set;} //won't work, every class should have props listed here then
}