Esempio n. 1
0
        private void ExecuteBatch(Action <IStorageActionsAccessor> action)
        {
            if (current.Value != null)
            {
                action(current.Value);
                return;
            }

            try
            {
                using (var storageActionsAccessor = new StorageActionsAccessor(tableColumnsCache, instance, database))
                {
                    current.Value = storageActionsAccessor;

                    action(storageActionsAccessor);
                    storageActionsAccessor.Commit();
                }
            }
            finally
            {
                current.Value = null;
            }
        }
		private void ExecuteBatch(Action<IStorageActionsAccessor> action)
		{
			if (current.Value != null)
			{
				action(current.Value);
				return;
			}

			try
			{
				using (var storageActionsAccessor = new StorageActionsAccessor(tableColumnsCache, instance, database))
				{
					current.Value = storageActionsAccessor;

					action(storageActionsAccessor);
					storageActionsAccessor.Commit();
				}
			}
			finally
			{
				current.Value = null;
			}
		}