public static PMP.Core.Entities.Task ConvertToTask(CreateTaskDTO dto)
 {
     PMP.Core.Entities.Task task = new PMP.Core.Entities.Task();
     task.Title = dto.Title;
     task.Description = dto.Description;
     task.DueDate = dto.DueDate;
     task.DateCreated = DateTime.Now;
     return task;
 }
 public int CreateTask(CreateTaskDTO dto)
 {
     ProjectUser relation = new ProjectUser();
     PMP.Core.Entities.Task task = ConvertToModel.ConvertToTask(dto);
     task.ProjectId = dto.ProjectId;
     _uWork.TaskRepo.Create(task);
     _uWork.TaskRepo.Save();
     return task.Id;
 }
 public JsonResult CreateTask(CreateTaskDTO dto)
 {
     int id =  _taskService.CreateTask(dto);
        return Json(id, JsonRequestBehavior.AllowGet);
 }