/// <summary> /// Constructor /// </summary> /// <param name="persistentStore"></param> /// <param name="mode"></param> internal UpdateContext(PersistentStore persistentStore, UpdateContextSyncMode mode) : base(persistentStore) { if (mode == UpdateContextSyncMode.Hold) throw new NotSupportedException("UpdateContextSyncMode.Hold is not supported"); // create a default change-set logger _changeSetRecorder = new DefaultEntityChangeSetRecorder(); _validator = new DomainObjectValidator(); _validationChangeTracker = new ChangeTracker(); }
/// <summary> /// Constructor /// </summary> /// <param name="persistentStore"></param> /// <param name="mode"></param> internal UpdateContext(PersistentStore persistentStore, UpdateContextSyncMode mode) : base(persistentStore) { if (mode == UpdateContextSyncMode.Hold) { throw new NotSupportedException("UpdateContextSyncMode.Hold is not supported"); } // create a default change-set logger _changeSetRecorder = new DefaultEntityChangeSetRecorder(); _validator = new DomainObjectValidator(); _validationChangeTracker = new ChangeTracker(); }
public IUpdateContext OpenUpdateContext(UpdateContextSyncMode mode) { try { SqlConnection connection = OpenConnection(); return(new UpdateContext(connection, _transactionNotifier, mode)); } catch (Exception e) { Platform.Log(LogLevel.Fatal, e, "Exception when opening database connection for update"); throw new PersistenceException("Unexpected exception opening database connection for update", e); } }
internal UpdateContext(SqlConnection connection, ITransactionNotifier transactionNotifier, UpdateContextSyncMode mode) : base(connection, transactionNotifier) { _transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted); _mode = mode; }
public IUpdateContext OpenUpdateContext(UpdateContextSyncMode mode) { try { SqlConnection connection = OpenConnection(); return new UpdateContext(connection, _transactionNotifier, mode); } catch (Exception e) { Platform.Log(LogLevel.Error, e, "Exception when opening database connection for update"); throw new PersistenceException("Unexpected exception opening database connection for update", e); } }
/// <summary> /// Obtains an <see cref="IUpdateContext"/> for use by the application to interact /// with this persistent store. /// </summary> /// <returns>a update context</returns> public IUpdateContext OpenUpdateContext(UpdateContextSyncMode mode) { return new UpdateContext(this, mode); }
internal UpdateContext(SqlConnection connection, ITransactionNotifier transactionNotifier, UpdateContextSyncMode mode) : base (connection, transactionNotifier) { _transaction = connection.BeginTransaction(mode == UpdateContextSyncMode.Flush ? IsolationLevel.ReadCommitted : IsolationLevel.Serializable); _mode = mode; }
internal UpdateContext(SqlConnection connection, ITransactionNotifier transactionNotifier, UpdateContextSyncMode mode) : base(connection, transactionNotifier) { _transaction = connection.BeginTransaction(mode == UpdateContextSyncMode.Flush ? IsolationLevel.ReadCommitted : IsolationLevel.Serializable); _mode = mode; }
/// <summary> /// Obtains an <see cref="IUpdateContext"/> for use by the application to interact /// with this persistent store. /// </summary> /// <returns>a update context</returns> public IUpdateContext OpenUpdateContext(UpdateContextSyncMode mode) { return(new UpdateContext(this, mode)); }
internal UpdateContext(SqlConnection connection, ITransactionNotifier transactionNotifier, UpdateContextSyncMode mode) : base (connection, transactionNotifier) { _transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted); _mode = mode; }