当前位置: 首页>>代码示例>>C#>>正文


C# IAdapterTransaction类代码示例

本文整理汇总了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);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:7,代码来源:AdoAdapter.IAdapterWithTransactions.cs

示例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);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:8,代码来源:AdoAdapter.IAdapterWithTransactions.cs

示例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))
            };
 }
开发者ID:xuzhg,项目名称:Simple.OData,代码行数:9,代码来源:ODataTableAdapterWithFunctions.cs

示例4: Execute

 internal int Execute(ICommandBuilder commandBuilder, IAdapterTransaction transaction)
 {
     IDbTransaction dbTransaction = ((AdoAdapterTransaction) transaction).DbTransaction;
     return Execute(commandBuilder, dbTransaction);
 }
开发者ID:loozhang,项目名称:Simple.Data,代码行数:5,代码来源:AdoAdapter.cs

示例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);
 }
开发者ID:ChrisMH,项目名称:Simple.Data,代码行数:6,代码来源:AdoAdapter.cs

示例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);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:6,代码来源:AdoAdapter.IAdapterWithTransactions.cs

示例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);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:5,代码来源:AdoAdapter.IAdapterWithTransactions.cs

示例8: Delete

 public int Delete(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
 {
     return Delete(tableName, criteria);
 }
开发者ID:rposbo,项目名称:Simple.Data,代码行数:4,代码来源:InMemoryAdapterIAdapterWithTransactions.cs

示例9: Update

 public int Update(string tableName, IDictionary<string, object> data, SimpleExpression criteria, IAdapterTransaction transaction)
 {
     return Update(tableName, data, criteria);
 }
开发者ID:rposbo,项目名称:Simple.Data,代码行数:4,代码来源:InMemoryAdapterIAdapterWithTransactions.cs

示例10: Insert

 public IDictionary<string, object> Insert(string tableName, IDictionary<string, object> data, IAdapterTransaction transaction, bool resultRequired)
 {
     return Insert(tableName, data, resultRequired);
 }
开发者ID:rposbo,项目名称:Simple.Data,代码行数:4,代码来源:InMemoryAdapterIAdapterWithTransactions.cs

示例11: Find

 public IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria, IAdapterTransaction transaction)
 {
     return Find(tableName, criteria);
 }
开发者ID:rposbo,项目名称:Simple.Data,代码行数:4,代码来源:InMemoryAdapterIAdapterWithTransactions.cs

示例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);
 }
开发者ID:ChrisMH,项目名称:Simple.Data,代码行数:4,代码来源:AdoAdapter.cs

示例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);
     }
 }
开发者ID:ChrisMH,项目名称:Simple.Data,代码行数:9,代码来源:AdoAdapter.cs

示例14: Find

 public IEnumerable<IDictionary<string, object>> Find(string tableName, SimpleExpression criteria,
                                                      IAdapterTransaction transaction)
 {
     return new AdoAdapterFinder(this, ((AdoAdapterTransaction)transaction).DbTransaction).Find(tableName,
                                                                                               criteria);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:6,代码来源:AdoAdapter.IAdapterWithTransactions.cs

示例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);
 }
开发者ID:JorgeGamba,项目名称:Simple.Data,代码行数:6,代码来源:AdoAdapter.IAdapterWithTransactions.cs


注:本文中的IAdapterTransaction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。