public async Task <ActionResult> Message(int id) { var item = await userTask.Message(id); if (item.SpendTime == DateTime.MinValue) { TempData["Error"] = "The task is not completed!"; return(RedirectToAction("Index")); } return(View(item)); }