using System.Reactive; using FastBill.Services; using PSCHelpdesk.Shared.ViewModels; using ReactiveUI; namespace FastBill.ViewModels; public class CustomerViewModel: ViewModelBase, IViewModelBase { public string _term; public string Term { get => _term; set => SetAndRaisePropertyChanged(ref _term, value); } private CustomerService _customerService; public ReactiveCommand SearchCustomer { get; } public CustomerViewModel(CustomerService customerService) { _customerService = customerService; SearchCustomer = ReactiveCommand.Create(searchTerm); } async void searchTerm() { var list = await _customerService.SearchCustomer(Term); } }