public HttpResponseMessage Delete(int id) { ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal; CustomerDA.DeleteCustomer(id, p.Claims); return(new HttpResponseMessage(HttpStatusCode.OK)); }
public HttpResponseMessage Delete(long id) { ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal; int i = CustomerDA.DeleteCustomer(id, p.Claims); if (i == 0) { return(new HttpResponseMessage(HttpStatusCode.NoContent)); } return(new HttpResponseMessage(HttpStatusCode.OK)); }
public HttpResponseMessage Delete(int id) { try { ClaimsPrincipal p = RequestContext.Principal as ClaimsPrincipal; CustomerDA.DeleteCustomer(id, p.Claims); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
public bool RemoveCustomer(Int32 customerID) { try { Int32 numberOfRecordsDeleted = customerDA.DeleteCustomer(customerID); if (numberOfRecordsDeleted == 1) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } finally { } }
public void Delete(int id) { da.DeleteCustomer(id); }