public IHttpActionResult DeleteTask(string id)
        {
            TaskBusiness tb        = new TaskBusiness();
            var          isDeleted = tb.DeleteTask(id);

            return(Ok(isDeleted));
        }
Beispiel #2
0
        public IHttpActionResult DeleteTask(int id)
        {
            Task task = taskBusiness.GetTask(id);

            if (task == null)
            {
                return(NotFound());
            }
            taskBusiness.DeleteTask(task);
            return(Ok(task));
        }