示例#1
0
 /// <summary>
 /// ConnectionString kommt aus den appsettings.json
 /// </summary>
 public UnitOfWork(ApplicationDbContext dbContext)
 {
     _dbContext = dbContext;
     Books      = new BookRepository(_dbContext);
     Authors    = new AuthorRepository(_dbContext);
 }
示例#2
0
 public UnitOfWork()
 {
     _dbContext          = new ApplicationDbContext();
     PublisherRepository = new PublisherRepository(_dbContext);
     BookRepository      = new BookRepository(_dbContext);
 }