public IHttpActionResult DeleteTask(DataLayer.Tasks t) { try { taskBL.DeleteTask(t); } catch { return(StatusCode(HttpStatusCode.BadRequest)); } return(StatusCode(HttpStatusCode.OK)); }
//Test Method for Delete List Item public void DeleteTaskTest() { int id = 2; try { blObj.DeleteTask(id); Assert.IsTrue(1 == 1); } catch { Assert.Inconclusive("Task not deleted"); } }
//Method used to delete existing task item public IHttpActionResult DeleteTask(int Id) { blObject = new TaskManagerBL(); blObject.DeleteTask(Id); return(Ok()); }
//Performance checking for delete list item public void DeleteTaskTest() { int id = 2; blObj.DeleteTask(id); }