public async Task <HttpResponseMessage> Delete(Guid ModelID) { try { var response = await ModelService.DeleteAsync(ModelID); if (response == 0) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "couldn't delete model")); } return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch { return(Request.CreateResponse(HttpStatusCode.InternalServerError, "couldn't delete model. database error")); } }