public IHttpActionResult Delete(string id) { try { var store = new Store { IDStore = id }; var mng = new StoreManagement(); mng.Delete(store); apiResp = new ApiResponse { Message = "Action was executed." }; return(Ok(apiResp)); } catch (BussinessException bex) { var MessageManage = new ApplicationMessageManagement(); MessageManage.Create(bex.AppMessage); return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message))); } catch (Exception ex) { ApplicationMessage msg = new ApplicationMessage { Message = ex.Message }; var MessageManage = new ApplicationMessageManagement(); MessageManage.Create(msg); return(InternalServerError(new Exception(ex.Message))); } }