I have the following model where I just modified my IEntity interface to take a generic type since I have multiple identity types.
public interface IEntity<T>
{
T Id { get; set; }
}
public class Product : IEntity<int>
{
public int Id { get; set; }
}
Now I have to modify my IRepository and IProductRepository to reflect this change but I am not sure how.
public interface IRepository<TEntity> where TEntity : IEntity
{
void Add(TEntity entity);
void Delete(TEntity entity);
}
public interface IProductRepository : IRepository<Product>
{
}
Anyone care to push me in the right direction?
Thanks