public HttpResponseMessage Delete(long id) { try { var result = _memberRegistration.DeleteMember(id); if (result) { var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.OK }; return(response); } else { var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.BadRequest }; return(response); } } catch (Exception) { var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.InternalServerError }; return(response); } }
public IActionResult Delete(long id) { try { var result = _memberRegistration.DeleteMember(id); if (result) { return(Ok()); } return(BadRequest()); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError)); } }