Exemplo n.º 1
0
        public async Task <ShoperItem> Get(string shopid, string sku, string InventoryId)
        {
            ClaimsPrincipal  principal  = HttpContext.User as ClaimsPrincipal;
            var              UserId     = _userManager.GetUserId(principal);
            UsersShoperToken shop       = _dbContext.ShoperToken.First <UsersShoperToken>(x => (x.Id == Int32.Parse(shopid)));
            Inventory        inventory  = _dbContext.Inventory.SingleOrDefault <Inventory>(x => (x.Sku == sku && x.InventoryId == Int32.Parse(InventoryId)));
            ShoperItem       shoperItem = await ShoperItem.GetAsync(shop.Token, shop.ShopUrl, sku, inventory.Counter);

            return(shoperItem);
        }