public AttendanceDbContextFactory(IConfig config) { _context = new AttendanceDbContext(); _context.Database.Connection.ConnectionString = config.DbConnectionString; // _context.Configuration.ProxyCreationEnabled = false; //_context.Configuration.LazyLoadingEnabled = false; // _context.Configuration.ValidateOnSaveEnabled = false; }
public AttendanceUow(IRepositoryProvider repositoryProvider, IAttendanceDbContextFactory dbContextFactory) { _repositoryProvider = repositoryProvider; _context = dbContextFactory.GetContext(); _repositoryProvider.DbContext = _context; }