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