I want some Repository class extend one common generic class to perform some common operation, problem is: how to config a UserExRepository type in config file.
public class UserExRepository : Repository<User>, IUserEx
{
public UserExRepository(Context context):base(context){ }
}
public abstract class Repository<TObject> : IRepository<TObject>
where TObject : class
{
protected Context Context = null;
public Repository(Context context)
{
Context = context;
}
// do some common operation about entity, like create, delete...
}