/// <summary> /// GET : api/shopsigns/{shopsignid}/categories /// </summary> /// <param name="shopsignId">shop sign id to extract</param> /// <returns></returns> public async Task <IEnumerable <Category> > GetCategoriesAsync([FromRoute] string shopsignId) { var categories = await GetArticleCategoriesAsync(); var stockGroups = GetStockGroupsFromShopSign(shopsignId); ShopSign shop = new ShopSign() { Id = shopsignId }; var r = categories.Where(c => string.Join(',', stockGroups) == c.StockGroupId); return(CategoriesCollection.BuildTree(r)); }
/// <summary> /// GET : api/shopsigns /// </summary> /// <returns></returns> public async Task <IEnumerable <ShopSign> > GetShopSignsAsync() { var categories = await GetArticleCategoriesAsync(); List <ShopSign> list = new List <ShopSign>(); var signs = new string[] { "KASANOVA", "KASANOVA+", "COIMPORT", "L'Outlet", "Casa sulla'albero", "Le Kikke", "E-Commerce" }; foreach (string sign in signs) { var stockGroups = GetStockGroupsFromShopSign(sign); ShopSign shop = new ShopSign() { Id = sign }; var r = categories.Where(c => string.Join(',', stockGroups) == c.StockGroupId); shop.Categories.AddRange(CategoriesCollection.BuildTree(r)); list.Add(shop); } return(list); }
public Task DeleteAsync(ShopSign entity) { throw new NotImplementedException(); }
public Task <ShopSign> AddAsync(ShopSign entity) { throw new NotImplementedException(); }