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