Versionr.LocalDB.AddStageOperations C# (CSharp) Method

AddStageOperations() private method

private AddStageOperations ( IEnumerable newStageOperations ) : void
newStageOperations IEnumerable
return void
        internal void AddStageOperations(IEnumerable<StageOperation> newStageOperations)
        {
            lock (this)
            {
                BeginTransaction();
                try
                {
                    foreach (var x in newStageOperations)
                        Insert(x);
                    Commit();
                }
                catch (Exception e)
                {
                    Rollback();
                    throw new Exception("Unable to add stage operations!", e);
                }
            }
        }