private IFoodDeliveryDbContext CreateDbContext() { var options = new DbContextOptionsBuilder <FoodDeliveryDbContext>() .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) .Options; var dbContext = new FoodDeliveryDbContext(options); dbContext.SaveChanges(); return(dbContext); }
public IdentityService(IConfiguration configuration, IPasswordHasher <User> passwordHasher, SignInManager <User> signInManager, UserManager <User> userManager, FoodDeliveryDbContext db) { _configuration = configuration; _signInManager = signInManager; _passwordHasher = passwordHasher; _userManager = userManager; _db = db; }
public OwnersRestaurantRequestRepository(FoodDeliveryDbContext dbContext) : base(dbContext) { _dbContext = dbContext; }
public UnitOfWork(FoodDeliveryDbContext context) { _context = context; }
public ToppingService(FoodDeliveryDbContext database) : base(database) { }
public FoodDeliveryDbContext Init() { return(dbContext ?? (dbContext = new FoodDeliveryDbContext())); }
public OrderRepository(FoodDeliveryDbContext context) : base(context) { }
protected Service(FoodDeliveryDbContext database) { this.Database = database; }
public MenuRepository(FoodDeliveryDbContext context) : base(context) { }
public ProductService(FoodDeliveryDbContext database) : base(database) { }
public OrderManager(FoodDeliveryDbContext database) { this.database = database; this.orders = new ConcurrentDictionary <string, ProductsList>(); }
public RoleStore(FoodDeliveryDbContext context) : base(context) { }
public UserStore(FoodDeliveryDbContext context) : base(context) { }
public CategoryService(FoodDeliveryDbContext database) : base(database) { }
public UserService(FoodDeliveryDbContext database) : base(database) { }
public UsersRoleRequestRepository(FoodDeliveryDbContext dbContext) : base(dbContext) { _dbContext = dbContext; }
// Note that a user of UnitOfWork will pass a context and it will be used in all of the repositories public UnitOfWork(FoodDeliveryDbContext context, IUserRepository userRepository) { _context = context; _userRepository = userRepository; }
public FeedbackService(FoodDeliveryDbContext database) : base(database) { }
public BaseRepository(FoodDeliveryDbContext context) { _context = context; }