I want to create an interface such as…
interface IRepository<params T>
{
T GetAll();
}
class PersonRepository : IRepository<Employees,Students>
{
Employees GetAll();
Students GetAll();
}
So clearly I know that the concrete implementation is impossible but is there any way to take a multi entity repostitory and create some super base interface?
Here’s something possible:
As you can see, you have to explicitly cast your class so your application can known which
GetAll()method to call.