private IFoodDeliveryDbContext CreateDbContext()
        {
            var options = new DbContextOptionsBuilder <FoodDeliveryDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;
            var dbContext = new FoodDeliveryDbContext(options);

            dbContext.SaveChanges();
            return(dbContext);
        }
Пример #2
0
 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;
 }
Пример #3
0
 public OwnersRestaurantRequestRepository(FoodDeliveryDbContext dbContext) : base(dbContext)
 {
     _dbContext = dbContext;
 }
Пример #4
0
 public UnitOfWork(FoodDeliveryDbContext context)
 {
     _context = context;
 }
Пример #5
0
 public ToppingService(FoodDeliveryDbContext database)
     : base(database)
 {
 }
Пример #6
0
 public FoodDeliveryDbContext Init()
 {
     return(dbContext ?? (dbContext = new FoodDeliveryDbContext()));
 }
Пример #7
0
 public OrderRepository(FoodDeliveryDbContext context) : base(context)
 {
 }
Пример #8
0
 protected Service(FoodDeliveryDbContext database)
 {
     this.Database = database;
 }
Пример #9
0
 public MenuRepository(FoodDeliveryDbContext context) : base(context)
 {
 }
Пример #10
0
 public ProductService(FoodDeliveryDbContext database)
     : base(database)
 {
 }
Пример #11
0
 public OrderManager(FoodDeliveryDbContext database)
 {
     this.database = database;
     this.orders   = new ConcurrentDictionary <string, ProductsList>();
 }
Пример #12
0
 public RoleStore(FoodDeliveryDbContext context)
     : base(context)
 {
 }
Пример #13
0
 public UserStore(FoodDeliveryDbContext context)
     : base(context)
 {
 }
Пример #14
0
 public CategoryService(FoodDeliveryDbContext database)
     : base(database)
 {
 }
Пример #15
0
 public UserService(FoodDeliveryDbContext database)
     : base(database)
 {
 }
 public UsersRoleRequestRepository(FoodDeliveryDbContext dbContext) : base(dbContext)
 {
     _dbContext = dbContext;
 }
Пример #17
0
 // 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;
 }
Пример #18
0
 public FeedbackService(FoodDeliveryDbContext database)
     : base(database)
 {
 }
Пример #19
0
 public BaseRepository(FoodDeliveryDbContext context)
 {
     _context = context;
 }