private void OpenAndSave(SaveWorkState saveWorkState) { OpenDbConnection(); // ensure connection is available for BeforeSaveEntities saveWorkState.BeforeSave(); SaveChangesCore(saveWorkState); saveWorkState.AfterSave(); }
private async Task OpenAndSaveAsync(SaveWorkState saveWorkState) { saveWorkState.BeforeSave(); await SaveChangesCoreAsync(saveWorkState); saveWorkState.AfterSave(); }