public async Task DeleteEntrieAsync() { if (SelectedEntrie == null) { return; } await _calendarRepository.RemoveEntrieAsync(SelectedEntrie); CalendarEntries.Remove(SelectedEntrie); SelectedEntrie = CalendarEntries.FirstOrDefault(); }
public async Task OnChangeAsync(CalendarEntrie calendarEntrie) { var item = await _calendarRepository.UpdateEntrieAsync(calendarEntrie); var oldValue = CalendarEntries.FirstOrDefault(x => x.Id == calendarEntrie.Id); if (oldValue != null) { oldValue = item; } NotifyOfPropertyChange(() => CalendarEntries); }