public IHttpActionResult put(tblTask item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.UpdateTask(item);
            return(Ok("Record Updated"));
        }
示例#2
0
        public void updateTask()
        {
            ProjectBAL     obj         = new ProjectBAL();
            List <tblTask> Ts          = obj.GetTask();
            tblTask        Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId);
            int            count       = obj.GetTask().Count();
            //dynamic testtask = new (Task) list<Task>;
            tblTask T = (new tblTask {
                TaskId = Ts[0].TaskId, TaskName = "taskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1
            });

            obj.UpdateTask(T);
            int            count1 = obj.GetTask().Count();
            List <tblTask> TS1    = obj.GetTask();

            Assert.AreEqual(count1, count);
            // Assert.AreEqual(T.TaskName, TS1[0].TaskName);
        }