コード例 #1
0
 public UnitOfWork(AppDbContext context)
 {
     _context     = context;
     Books        = new BookRepo(_context);
     Authors      = new AuthorRepo(_context);
     Reservations = new ReservationRepo(_context);
     Users        = null;
 }
コード例 #2
0
 public UnitOfWork(AppDbContext context, UserManager <User> user)
 {
     _context     = context;
     Books        = new BookRepo(_context);
     Authors      = new AuthorRepo(_context);
     Reservations = new ReservationRepo(_context);
     Users        = user;
 }