public CashierVM(ICashierRepository repository, IMainNavigationService navigationService) { this.DataGridVisibility = true; this.ButtonVisible = false; _repository = repository; _navigationService = navigationService; this.Cashier = new CashierModel(); Task.Factory.StartNew(() => { lock (locker) { this.Cashiers = new ObservableCollection <CashierModel>(_repository.GetAll()); } Application.Current.Dispatcher.Invoke( new Action(() => { this.DataGridVisibility = false; this.ButtonVisible = true; this.ForegroundForUser = "******"; this.MessageForUser = "******"; })); }); ReceiveCashier(); }
public IActionResult GetAll() { return(Ok(_cashierRepository.GetAll())); }