Esempio n. 1
0
        async Task ExecuteLoadDumpstersCommand()
        {
            IsBusy = true;

            try
            {
                var dumpsters = await dumpsterService.GetByProductAsync(Product.Id);

                Dumpsters = new ObservableCollection <DumpsterDto>(dumpsters);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
        public async Task <ActionResult> GetByProduct([FromQuery] int productId)
        {
            var dumpsters = await _dumpsterService.GetByProductAsync(productId);

            return(Ok(dumpsters));
        }