I have implemented IRepository interface for multiple domains but I don't know how to call specific method.
Below is the code :
public interface IRepository<T> where T : class
{
IEnumerable<T> GetAll();
void Add(T entity);
void Update(T entity);
}
public interface IProjectRepository : IRepository<ProjectType>, IRepository<Project>, IRepository<ProjectDetail>
{
}
public class ProjectRepository : IProjectRepository
{
// implemenation
}
Now, When I create object of ProjectRepository class it shows all methods of interface but only expecting projecttype parameter.
I don't know, is it correct way of implementation? or Is there another way to implement similar thing?