public OrdersRepository(PetStoreContext context, ILogger <OrdersRepository> logger)
 {
     _context = context ??
                throw new ArgumentNullException(nameof(context));
     _logger = logger ??
               throw new ArgumentNullException(nameof(logger));
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }
예제 #3
0
 public PetStoreContextSeedData(PetStoreContext context, UserManager <UserAccount> userManager, RoleManager <UserRole> roleManager)
 {
     _context     = context;
     _userManager = userManager;
     _roleManager = roleManager;
 }