本文整理汇总了C#中System.Data.IDbConnection类的典型用法代码示例。如果您正苦于以下问题:C# System.Data.IDbConnection类的具体用法?C# System.Data.IDbConnection怎么用?C# System.Data.IDbConnection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.Data.IDbConnection类属于命名空间,在下文中一共展示了System.Data.IDbConnection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetConnection
public override System.Data.IDbConnection GetConnection()
{
if (Connection == null)
Connection = base.GetConnection();
return Connection;
}
开发者ID:Tigraine,项目名称:ic-website,代码行数:7,代码来源:SqLiteInMemoryTestingConnectionProvider.cs
示例2: Basiclist
public Basiclist(System.Data.IDbConnection connection, string volumename)
{
m_connection = connection;
m_volumename = volumename;
m_transaction = m_connection.BeginTransaction();
var tablename = TABLE_PREFIX + "-" + Library.Utility.Utility.ByteArrayAsHexString(Guid.NewGuid().ToByteArray());
using(var cmd = m_connection.CreateCommand())
{
cmd.Transaction = m_transaction;
cmd.ExecuteNonQuery(string.Format(@"CREATE TEMPORARY TABLE ""{0}"" {1}", tablename, TABLEFORMAT));
m_tablename = tablename;
}
m_insertCommand = m_connection.CreateCommand();
m_insertCommand.Transaction = m_transaction;
m_insertCommand.CommandText = string.Format(@"INSERT INTO ""{0}"" {1}", m_tablename, INSERTCOMMAND);
m_insertCommand.AddParameters(INSERTARGUMENTS);
}
开发者ID:HITSUN2015,项目名称:duplicati,代码行数:19,代码来源:LocalTestDatabase.cs
示例3: DBConnection
public DBConnection(IDBProvider dbProvider, string ConnectionString)
{
this.CommandTimeout = 30;
this._dbProvider = dbProvider;
_conn = (System.Data.IDbConnection)_dbProvider.CreateConnection(ConnectionString);
}
开发者ID:Fast-Forward-llc,项目名称:FFLib,代码行数:6,代码来源:DBConnection.cs
示例4: MyORMFramework
/// <summary>
/// ��ʼ������
/// </summary>
/// <param name="conn">���ݿ����Ӷ��
|
请发表评论