示例#1
0
        public IHttpActionResult Delete(int id)
        {
            TaskBAL ts = new TaskBAL();

            ts.DeleteTask(id);
            return(Ok("Record is deleted"));
        }
示例#2
0
        public void DeleteTask()
        {
            TaskBAL     obj         = new TaskBAL();
            List <Task> Ts          = obj.GetTask();
            Task        Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId);
            int         count1      = obj.GetTask().Count();

            obj.DeleteTask(Taskgetbyid.TaskId);
            int count2 = obj.GetTask().Count();

            Assert.AreEqual(count2, count1 - 1);
        }