public IActionResult Create(TaskItem model) { if (ModelState.IsValid) { _db.Add(model); _db.SaveChanges(); return(RedirectToAction("Index")); } return(View(model)); }
public IActionResult Create(TaskItem model) { if (ModelState.IsValid) { _db.Add(model); _db.SaveChanges(); return(RedirectToAction("Index")); } return(View(model)); }