예제 #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();
 }