private async Task GetCashButtons() { var response = await _cashBussinessLogic.GetCashButtons(); CashButtons.Clear(); foreach (var button in response) { CashButtons.Add(new CashButtonModel { Button = button.Button, Value = button.Value }); } }
private async Task GetCashButtons() { var cashButtons = await _fuelPumpBusinessLogic.GetManualCashButtons(); CashButtons?.Clear(); if (cashButtons?.Count > 0) { CashButtons = new ObservableCollection <CashButtonModel>( from c in cashButtons select new CashButtonModel { Button = c.Button, Value = c.Value }); } }