public static void Execute(this RelationalModel model, Batch batch) { model.DoExecute(batch); batch.Inserts.ForEach(x => x.Version++); batch.Updates.ForEach(x => x.Version++); }
/// <summary> /// Execute a batch in an all or nothing ACID transaction. Version field of each entity is incremented after a successful /// Exceptions: OptimisticConcurrencyException if there are version conflicts or CommandAbortedException if any entity type is undefined /// </summary> /// <param name="db"></param> /// <param name="batch"></param> public static void Execute(this RelationalModel db, Batch batch) { db.DoExecute(batch); batch.Inserts.ForEach(i => i.Version++); batch.Updates.ForEach(u => u.Version++); }