Ejemplo n.º 1
0
        public LocationProductsViewModel(int locationId)
        {
            locationApi = new LocationAPI();
            var products = locationApi.GetProduct(locationId).Select(x => new ProductStorage()
            {
                ProductName = x.Name,
                Price       = x.Price,
                Value       = x.Value,
                TotalPrice  = x.Price * Convert.ToDecimal(x.Value)
            });

            Products = new ObservableCollection <ProductStorage>(products);
        }