public static bool CreateOrderStatuses(JuicyBurgerDbContext context) { if (!context.OrderStatuses.Any()) { context.OrderStatuses.Add(new OrderStatus { Name = ServicesGlobalConstants.OrderStatusActive }); context.OrderStatuses.Add(new OrderStatus { Name = ServicesGlobalConstants.OrderStatusFinish }); //context.OrderStatuses.Add(new OrderStatus { Name = "Processing" }); context.SaveChanges(); return(true); } return(false); }
public static bool CreateRoles(JuicyBurgerDbContext context) { if (!context.Roles.Any()) { context.Roles.Add(new IdentityRole { Name = ServicesGlobalConstants.Admin, NormalizedName = ServicesGlobalConstants.AdminUpperCase }); context.Roles.Add(new IdentityRole { Name = ServicesGlobalConstants.User, NormalizedName = ServicesGlobalConstants.UserUpperCase }); //context.Roles.Add(new IdentityRole { Name = "Dasher", NormalizedName = "DASHER" }); context.SaveChanges(); return(true); } return(false); }
public IngredientsService(JuicyBurgerDbContext context) { this.context = context; }
public ProductsService(JuicyBurgerDbContext context, IIngredientsService ingredientsService) { this.context = context; this.ingredientsService = ingredientsService; }
public OrdersService(JuicyBurgerDbContext context) { this.context = context; }
public RestaurantsService(JuicyBurgerDbContext context) { this.context = context; }
public ReceiptService(JuicyBurgerDbContext context, IOrdersService ordersService) { this.context = context; this.ordersService = ordersService; }