public async Task <IActionResult> Create(DietType diet) { if (!ModelState.IsValid) { return(View(diet)); } await _db.Add(diet); var dietList = await _db.GetAllDiets(); return(View("Index", dietList)); }