public async Task <IActionResult> Create([Bind("CuiName", "Descript")] Cuisin cuisin) { if (ModelState.IsValid) { db.Add(cuisin); await db.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cuisin)); }
public Cuisin get(string id) { Cuisin cuisin = db.Cuisin.Where(c => c.CuiName == id).FirstOrDefault(); return(cuisin); }