Exemple #1
0
        public IHttpActionResult Get(string id)
        {
            try
            {
                var mng   = new StoreManagement();
                var store = new Store
                {
                    IDStore = id
                };

                store        = mng.RetrieveById(store);
                apiResp      = new ApiResponse();
                apiResp.Data = store;
                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)));
            }
        }