示例#1
0
 public GenericRepository(IDbContextFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentException("IDbContextFactory is null!.");
     }
     this._factory = factory;
     this._context = factory.GetDbContext();
 }
示例#2
0
 public UnitOfWork(IDbContextFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentException("IDbContextFactory is null!.");
     }
     this._factory = factory;
     this._context = factory.GetDbContext();
 }