Esempio n. 1
0
        public IActionResult DeleteToDoList([FromRoute] Guid id)
        {
            try
            {
                _service.DeleteToDoList(id, User.GetEmail());
            }
            catch (EntityNotFoundException)
            {
                return(NotFound());
            }

            return(Ok());
        }
Esempio n. 2
0
        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));
 }
Esempio n. 4
0
        public ActionResult <int> DeleteToDoList(int id)
        {
            var returnId = _toDoListService.DeleteToDoList(id);

            return(StatusCode((int)HttpStatusCode.OK, returnId));
        }