public async Task <JsonResult> ReportTask(Guid TaskItemId) { var result = new ReportProjectModel(); try { var taskItems = await _taskItemService.AllTaskItemChildren(TaskItemId); var model = _mapper.Map <List <TaskItemModel> >(taskItems); result = new ReportProjectModel() { ProjectId = TaskItemId, TaskItems = model }; } catch (Exception ex) { _loggerServices.WriteError(ex.Message); } return(Json(result, JsonRequestBehavior.AllowGet)); }