public IHttpActionResult UpdateTask(TaskTable tasks)
 {
     if (ModelState.IsValid)
     {
         try
         {
             bl.Update(tasks.TaskId, tasks);
         }
         catch (Exception)
         {
             return(Ok("Error is occured during updated !"));
         }
         return(Ok("Record is updated Sucessfully !"));
     }
     return(Ok());
 }
        public void UpdateTask()
        {
            var tasks = new TaskTable
            {
                TaskId      = 1003,
                ProjectName = "NUNIT",
                ProjectId   = 100,
                TaskName    = "NUNIT",
                Priority    = 10,
                ParentTask  = "TEST",
                IsParent    = true,
                StartDate   = Convert.ToDateTime("2018-10-18"),
                EndDate     = Convert.ToDateTime("2018-10-18"),
                UserId      = 1,
                UserName    = "******",
                Deleted     = false,
                Status      = "Completed"
            };

            bool updated = task.Update(tasks.TaskId, tasks);

            Assert.AreEqual(true, updated);
        }