Пример #1
0
        public GetCatalogResponse GetCatalogAll()
        {
            var getCatalogResponse = new GetCatalogResponse();

            try
            {
                var _dataAccessResponse = _productDataAccess.GetCatalogAll();
                if (_dataAccessResponse != null)
                {
                    getCatalogResponse = _productHelper.CreateList(_dataAccessResponse);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("ProductModel.GetCatalogAll : ERROR : " + ex.Message);
                throw;
            }
            return(getCatalogResponse);
        }
Пример #2
0
        public GetCatalogResponse GetCatalogSearchBar(GetSearchBarRequest request)
        {
            GetCatalogResponse getCatalogResponse = new GetCatalogResponse();

            try
            {
                ProductDataAcess _dataAccess = new ProductDataAcess();
                var _dataAccessResponse      = _dataAccess.GetCatalogSearchBar(request);
                if (_dataAccessResponse != null)
                {
                    ProductHelper _helper = new ProductHelper();
                    getCatalogResponse = _helper.CreateList(_dataAccessResponse);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("ProductModel.GetCatalogSearchBar : ERROR : " + ex.Message);
                throw;
            }
            return(getCatalogResponse);
        }