本文整理汇总了C#中IAdapterTransaction类的典型用法代码示例。如果您正苦于以下问题:C# IAdapterTransaction类的具体用法?C# IAdapterTransaction怎么用?C# IAdapterTransaction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAdapterTransaction类属于命名空间,在下文中一共展示了IAdapterTransaction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateMany
public int UpdateMany(string tableName, IEnumerable<IDictionary<string, object>> data,
IAdapterTransaction transaction, IList<string> keyFields)
{
IBulkUpdater bulkUpdater = ProviderHelper.GetCustomProvider<IBulkUpdater>(ConnectionProvider) ??
new BulkUpdater();
return bulkUpdater.Update(this, tableName, data.ToList(), ((AdoAdapterTransaction)transaction).DbTransaction);
}
示例2: InsertMany
public IEnumerable<IDictionary<string, object>> InsertMany(string tableName,
IEnumerable<IDictionary<string, object>> data,
IAdapterTransaction transaction,
Func<IDictionary<string, object>, Exception, bool> onError, bool resultRequired)
{
return new AdoAdapterInserter(this, ((AdoAdapterTransaction)transaction).DbTransaction).InsertMany(
tableName, data, onError, resultRequired);
}
示例3: ExecuteFunction
private IEnumerable<IEnumerable<IEnumerable<KeyValuePair<string, object>>>> ExecuteFunction(string functionName,
IDictionary<string, object> parameters, IAdapterTransaction transaction)
{
return new[]
{
Utils.ExecuteAndUnwrap(() =>
GetODataClient(transaction).ExecuteFunctionAsync(functionName, parameters))
};
}
示例4: Execute
internal int Execute(ICommandBuilder commandBuilder, IAdapterTransaction transaction)
{
IDbTransaction dbTransaction = ((AdoAdapterTransaction) transaction).DbTransaction;
return Execute(commandBuilder, dbTransaction);
}
示例5: Update
public int Update(string tableName, IDictionary<string, object> data, IAdapterTransaction adapterTransaction)
{
var keyFieldNames = GetKeyFieldNames(tableName).ToArray();
if (keyFieldNames.Length == 0) throw new AdoAdapterException("No Primary Key found for implicit update");
return Update(tableName, data, GetCriteria(tableName, keyFieldNames, data), adapterTransaction);
}
示例6: Update
public int Update(string tableName, IDictionary<string, object> data, IAdapterTransaction adapterTransaction)
{
string[] keyFieldNames = GetKeyNames(tableName).ToArray();
if (keyFieldNames.Length == 0) throw new AdoAdapterException(string.Format("No primary key found for implicit update of table '{0}'.", tableName));
return Update(tableName, data, GetCriteria(tableName, keyFieldNames, data), adapterTransaction);
}
示例7: Upsert
public override IDictionary<string, object> Upsert(string tableName, IDictionary<string, object> data, SimpleExpression criteria, bool resultRequired, IAdapterTransaction adapterTransaction)
{
var transaction = ((AdoAdapterTransaction) adapterTransaction).DbTransaction;
return new AdoAdapterUpserter(this, transaction).Upsert(tableName, data, criteria, resultRequired);
}
示例8: Delete
public int Delete(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
{
return Delete(tableName, criteria);
}
示例9: Update
public int Update(string tableName, IDictionary<string, object> data, SimpleExpression criteria, IAdapterTransaction transaction)
{
return Update(tableName, data, criteria);
}
示例10: Insert
public IDictionary<string, object> Insert(string tableName, IDictionary<string, object> data, IAdapterTransaction transaction, bool resultRequired)
{
return Insert(tableName, data, resultRequired);
}
示例11: Find
public IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
{
return Find(tableName, criteria);
}
示例12: Insert
public IDictionary<string, object> Insert(string tableName, IDictionary<string, object> data, IAdapterTransaction transaction)
{
return new AdoAdapterInserter(this, ((AdoAdapterTransaction)transaction).Transaction).Insert(tableName, data);
}
示例13: Execute
private static int Execute(ICommandBuilder commandBuilder, IAdapterTransaction transaction)
{
var dbTransaction = ((AdoAdapterTransaction) transaction).Transaction;
using (var command = commandBuilder.GetCommand(dbTransaction.Connection))
{
command.Transaction = dbTransaction;
return TryExecute(command);
}
}
示例14: Find
public IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria,
IAdapterTransaction transaction)
{
return new AdoAdapterFinder(this, ((AdoAdapterTransaction)transaction).DbTransaction).Find(tableName,
criteria);
}
示例15: Insert
public IDictionary<string, object> Insert(string tableName, IDictionary<string, object> data,
IAdapterTransaction transaction, bool resultRequired)
{
return new AdoAdapterInserter(this, ((AdoAdapterTransaction)transaction).DbTransaction).Insert(tableName,
data, resultRequired);
}