public async Task <ProductsTypesAllAndThis> GetPropductParentTypesAsync() { ProductsTypesAllAndThis result = new ProductsTypesAllAndThis(); List <ProductTypeMini> productTypeMinis = await GetProductTypeMinisAsync(); result.SetProductTypes(productTypeMinis); return(result); }
public async Task <ProductsTypesAllAndThis> GetProductTypeThisAndParentsAsync(int id) { ProductsTypesAllAndThis result = new ProductsTypesAllAndThis(); List <ProductTypeMini> productTypeMinis = await GetProductTypeMinisAsync(); result.SetProductTypes(productTypeMinis, id); string keyName = "ProductTypeMini"; var productsTypes = _cacheService.Get <List <ProductTypeMini> >(keyName); if (productsTypes != null) { result.ProductType = productsTypes.Where(preProductTypes => preProductTypes.Id == id).First(); } else { result.ProductType = await _fcdStoreContext.GetProductsTypeAsync(id); } return(result); }
public async Task <IActionResult> NewProductsTypes() { ProductsTypesAllAndThis productsTypesAllAndThis = await _dataProcessingConveyor.GetPropductParentTypesAsync(); return(View(productsTypesAllAndThis)); }