I am trying to create a repository class for each table. For example I have TableA, TableB and TableC. TableB and TableC has Foreign key to TableA. I created an interface for TableA, TableB and TableC with SaveData() and ListData(). I have MVC form which inserts the data into these tables. When implementing these interface methods do I have to create a seperate class for each interface? Please let me if I am doing right. I appreciate any help.
Public interface ITableA
{
void SaveData(TableAEntity);
List<TableAEntity> ListData();
}
Public interface ITableB
{
void SaveData(TableBEntity);
List<TableBEntity> ListData();
}
Public class ImplementTableA_TableB: ITableA, ITableB
{
public void SaveData(TableAEntity)
{
}
public void SaveData(TableBEntity)
{
}
}