public ReceiptListViewModel(IReceiptRepo repo) { // Initialisierung des Repositories _repo = repo; SearchCommand = new DelegateCommand(async () => await Search()); SearchCommand.ObservesProperty(() => SearchTerm); ReceiptList = new List<Receipt> { new Receipt { Title = "Rezept 1", IsFavorit = false }, new Receipt { Title = "Rezept 2", IsFavorit = false }, new Receipt { Title = "Rezept 3", IsFavorit = true }, new Receipt { Title = "Rezept 4", IsFavorit = false } }; }
public ReceiptListViewModel(IReceiptRepo repo, INavigationService navigationService, IApiService apiService) { if (repo == null) { throw new ArgumentNullException(nameof(repo)); } // Initialisierung des Repositories _repo = repo; _navService = navigationService; _apiService = apiService; SearchCommand = new DelegateCommand(async() => await Search()); SearchCommand.ObservesProperty(() => SearchTerm); AddNewCommand = new DelegateCommand(async() => await AddNew()); EditCommand = new DelegateCommand <Receipt>(async receipt => await Edit(receipt)); }
public ReceiptService(IReceiptRepo receiptRepo) { _receiptRepo = receiptRepo; }
public ReceiptController(IReceiptRepo receipt) { receiptRepo = receipt; }