public async Task <IActionResult> Create([Bind("Id,Title,Description")] TaskItem taskItem) { if (ModelState.IsValid) { taskItem.Id = Guid.NewGuid(); _service.AddTaskItem(taskItem); return(RedirectToAction(nameof(Index))); } return(View(taskItem)); }
public async Task <IActionResult> Create([Bind("Id,Title,Description")] TaskItem taskItem) { if (ModelState.IsValid) { taskItem.Id = Guid.NewGuid(); _service.AddTaskItem(taskItem); return(RedirectToAction(nameof(Index))); } return(View(taskItem)); }