public IHttpActionResult Post(Store store) { try { var mng = new StoreManagement(); mng.Create(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))); } }