62,254
社区成员
发帖
与我相关
我的任务
分享interface IRepository<T>class Repository<T> : IRepository<T> where T : class, new()IPostRepository:IRepository<Post>PostRepository : Repository<Post>, IPostRepositorybuilder.RegisterType<PostRepository>().As<IPostRepository>();
class PostRepository : Repository<Post>, IPostRepository
{
protected readonly IPostRepository repo;
public Service(IPostRepository _repo)
{
repo = _repo;
}
}