Esempio n. 1
0
 public UnitOfWork()
 {
     _context = _context ?? new SurvayArmDbContext();
     _context.Configuration.LazyLoadingEnabled    = false;
     _context.Configuration.ProxyCreationEnabled  = false;
     _context.Configuration.ValidateOnSaveEnabled = false;
 }
Esempio n. 2
0
 public Repository(SurvayArmDbContext context)
 {
     _context = context ?? new SurvayArmDbContext();
     DbSet    = _context.Set <TEntity>();
 }