public List <ProductType> GetTypes() { return(ExecuteFaultHandledOperation(() => { List <ProductType> product_types = _cache.Get(CacheKeys.ProductTypes) as List <ProductType>; if (product_types == null) { Log.Debug("ProductTypeRepository GetAll called"); product_types = new List <ProductType>(); var product_type_data = _report_prod_type.GetAll(); foreach (ProductTypeData account_type in product_type_data) { product_types.Add(_prod_es.Map(account_type)); } _cache.Set(CacheKeys.ProductTypes, product_types); Log.Debug("ProductTypeRepository GetAll complete"); } return product_types; })); }
public async Task <IEnumerable <ProductType> > GetAllProductTypeAsync() => _productTypeEntityService.Map(await _listRepository.GetAllProductTypesAsync());