public async Task <IActionResult> Create([Bind("name,cookingInstructions,peopleFed,glutenFree,vegetarian,vegan")] Recipe recipe) { if (ModelState.IsValid) { _context.Add(recipe); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(recipe)); }
public async Task <IActionResult> Create([Bind("name,type,expDate,vendor,amount,cost")] Ingredient ingredient) { if (ModelState.IsValid) { _context.Add(ingredient); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ingredient)); }
public async Task <IActionResult> Create([Bind("username,email")] Login login) { if (ModelState.IsValid) { _context.Add(login); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(login)); }
public async Task <IActionResult> Create([Bind("Name,Quantity,QuantityReserved,Description,Location")] Equipment equipment) { if (ModelState.IsValid) { _context.Add(equipment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(equipment)); }