/// <summary> /// 转换上下文 /// </summary> /// <typeparam name="TDbContext"></typeparam> /// <returns></returns> public TDbContext As <TDbContext>() where TDbContext : IDbContext => _context.As <TDbContext>();
/// <summary>构造函数</summary> public EFRepository(IDbContext context) { _context = context.As <DbContext>(); Store = _context.Set <TEntity>(); }