protected override void Seed(PizzeriaContext context)
 {
     #region Load_Ingredients
     if (!context.Ingredient.Any())
     {
         context.Ingredient.AddOrUpdate(
             new Ingredient {
             IngredientId = 1, Name = "Tomate", Price = 0.10M
         },
             new Ingredient {
             IngredientId = 2, Name = "Queso", Price = 1.10M
         },
             new Ingredient {
             IngredientId = 3, Name = "Oregano", Price = 0.05M
         },
             new Ingredient {
             IngredientId = 4, Name = "Jamon", Price = 0.90M
         },
             new Ingredient {
             IngredientId = 5, Name = "PiƱa", Price = 1M
         }
             );
     }
     #endregion
 }
Example #2
0
 public CommentService(PizzeriaContext context, IPizzaService pizzaService, ICommentMapper commentMapper) : base(context)
 {
     _context       = context;
     _commentMapper = commentMapper;
     _pizzaService  = pizzaService;
 }
Example #3
0
 public InventoriesController(PizzeriaContext context)
 {
     _context = context;
 }
Example #4
0
 public PizzaService(PizzeriaContext context, IPizzaMapper pizzaMapper, IPizzaIngredientService pizzaIngredientService) : base(context)
 {
     _context                 = context;
     _pizzaMapper             = pizzaMapper;
     _pizzaIngredientsService = pizzaIngredientService;
 }
Example #5
0
 public PizzaIngredientService(PizzeriaContext context, IIngredientService ingredientService)
 {
     _context           = context;
     _ingredientService = ingredientService;
 }
 public UserService(PizzeriaContext context, IUserMapper userMapper) : base(context)
 {
     _context    = context;
     _userMapper = userMapper;
 }
Example #7
0
 public IngredientService(PizzeriaContext context, IIngredientMapper ingredientMapper) : base(context)
 {
     _context          = context;
     _ingredientMapper = ingredientMapper;
 }
Example #8
0
 public BusinessLogic(PizzeriaContext context)
 {
     this._context = context;
 }
 public DishTypeRepository(PizzeriaContext context)
 {
     _context = context;
 }
 public PizzaOrdersController(PizzeriaContext context)
 {
     _context = context;
 }
 public LocationsController(PizzeriaContext context)
 {
     _context = context;
 }