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