public IActionResult DeleteToDoList([FromRoute] Guid id) { try { _service.DeleteToDoList(id, User.GetEmail()); } catch (EntityNotFoundException) { return(NotFound()); } return(Ok()); }
public IActionResult DeleteToDoList(int id) { var(status, message) = _toDoListService.DeleteToDoList(id); return(status ? (IActionResult)Ok() : BadRequest(new { message })); }
/// <summary> /// Deletes to do list. /// </summary> /// <param name="id">The identifier.</param> /// <returns></returns> public int DeleteToDoList(int id) { return(_todoListService.DeleteToDoList(id)); }
public ActionResult <int> DeleteToDoList(int id) { var returnId = _toDoListService.DeleteToDoList(id); return(StatusCode((int)HttpStatusCode.OK, returnId)); }