// DELETE api/<controller>/5 public IHttpActionResult Delete(int id) { var content = new ResponseContent <Persons>(null); using (var personsBusiness = new PersonsBusiness()) { content.Result = personsBusiness.DeletePersonById(id) ? "1" : "0"; return(new StandartResult <Persons>(content, Request)); } }
private void DeletePerson(int id) { try { using (var Persons = new PersonsBusiness()) { var opSuccessful = Persons.DeletePersonById(id); } } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); } }