示例#1
0
        // 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));
        }
示例#2
0
        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));
            }
        }
示例#3
0
 // GET: Task/Details/5
 public ActionResult Details(int id)
 {
     return(View(_mapper.ToViewModel(_service.GetById(id))));
 }