public AddLogViewModel(INavigation navigation) { _navigation = navigation; _fuelingLogValidator = new FuelingLogValidator(); _fuelingLog = new FuelingLog(); _fuelingLogRepository = new FuelingLogRepository(); AddLogCommand = new Command(async() => await AddFuelingLog()); }
public DetailsFuelingLogViewModel(INavigation navigation, int selectedFuelingLogID) { _navigation = navigation; _fuelingLogValidator = new FuelingLogValidator(); _fuelingLog = new FuelingLog(); _fuelingLog.Id = selectedFuelingLogID; _fuelingLogRepository = new FuelingLogRepository(); DeleteFuelingLogCommand = new Command(async() => await DeleteLog()); UpdateFuelingLogCommand = new Command(async() => await UpdateLog()); FetchFuelingLogDetails(); }