public async void SaveModel() { SaveBegins?.Invoke(); await _employeeCatalog.SaveAsync(); //await _stationCatalog.SaveAsync(); SaveEnd?.Invoke(); }
public async void SaveModel() { // Notifies subscribers that Save is about to start SaveBegins?.Invoke(); await _movieCatalog.SaveAsync(); await _studioCatalog.SaveAsync(); // Notifies subscribers that Save is about to end SaveEnds?.Invoke(); }
public async void SaveModel() { SaveBegins?.Invoke(); await _carCatalog.SaveAsync(); await _customerCatalog.SaveAsync(); await _employeeCatalog.SaveAsync(); await _saleCatalog.SaveAsync(); SaveEnds?.Invoke(); }
/// <inheritdoc /> /// <summary> /// Relays call of Save to data source, if the data /// source supports the Load operation /// </summary> public async Task SaveAsync(bool suppressException = true) { if (_supportedOperations.Contains(PersistencyOperations.Save)) { SaveBegins?.Invoke(); await _persistentSource.Save(CreatePersistentDataObjects(_collection.All)); SaveEnds?.Invoke(); } else { if (!suppressException) { throw new NotSupportedException(); } } }