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); }
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); }