public async Task <IActionResult> Create([Bind("TeaTagID,TeaId")] TeaTagsLink teaTagsLink)
        {
            if (ModelState.IsValid)
            {
                _context.Add(teaTagsLink);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(teaTagsLink));
        }
        public async Task <IActionResult> Create([Bind("CoffeeID,CoffeeName,Description,CoffeeType,Caffiene")] Coffee coffee)
        {
            if (ModelState.IsValid)
            {
                _context.Add(coffee);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(coffee));
        }
        public async Task <IActionResult> Create([Bind("PopId,PopName,FruitFlavor,Diet,PackageType,PreferTemp,Sugar,NumDrinkPerDay")] Pop pop)
        {
            if (ModelState.IsValid)
            {
                _context.Add(pop);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(pop));
        }
        public async Task <IActionResult> Create([Bind("TeaStoreID,Name,Url")] TeaStore teaStore)
        {
            if (ModelState.IsValid)
            {
                _context.Add(teaStore);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(teaStore));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Create([Bind("TeaID,TeaName,Discription,TeaType,Organic,Caffene,BrewType,BrewTempC,BrewTime,Source")] Tea tea)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tea);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tea));
        }
        public async Task <IActionResult> Create([Bind("TeaIngredientID,IngredientName")] TeaIngredient teaIngredient)
        {
            if (ModelState.IsValid)
            {
                _context.Add(teaIngredient);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(teaIngredient));
        }
        public async Task <IActionResult> Create([Bind("HotCoffeeID,HotCoffeeType,HotCoffeeName")] HotCoffee hotCoffee)
        {
            if (ModelState.IsValid)
            {
                _context.Add(hotCoffee);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(hotCoffee));
        }
        public async Task <IActionResult> Create([Bind("FrapID,FrapType,FrapName")] Frapuccino frapuccino)
        {
            if (ModelState.IsValid)
            {
                _context.Add(frapuccino);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(frapuccino));
        }