public async Task <IActionResult> Create(DiaryModel model) { if (ModelState.IsValid) { await diaryService.CreateAsync(model); return(Redirect("~/Home/Index")); } return(View(model)); }