public IHttpActionResult Put(TaskDto tasktoDto)
 {
     if (ModelState.IsValid)
     {
         if (!ReferenceEquals(tasktoDto, null))
         {
             _taskRepository.Update(tasktoDto.ToTask());
         }
     }
     return(Ok());
 }
 public IHttpActionResult Post(TaskDto task)
 {
     if (ModelState.IsValid)
     {
         if (!ReferenceEquals(task, null))
         {
             task.CreateDate = DateTime.Now;
             _taskRepository.Create(task.ToTask());
         }
     }
     return(Ok());
 }