// GET: Task/Details/5 public async Task <IActionResult> Details(Guid?id) { if (id == null) { return(NotFound()); } var task = _taskAppService.GetById(id.Value); if (task == null) { return(NotFound()); } return(View(task)); }
public ResponseMessage GetById(int id) { try { var board = _taskService.GetById(id); if (board != null) { return(new ResponseMessage(true, board, "", HttpStatusCode.OK)); } return(new ResponseMessage(true, null, "Task not found!", HttpStatusCode.OK)); } catch (Exception err) { return(new ResponseMessage(false, err, err.Message, HttpStatusCode.BadRequest)); } }
// GET: Task/Details/5 public ActionResult Details(int id) { return(View(_mapper.ToViewModel(_service.GetById(id)))); }