本文整理汇总了C#中IConnectionFactory.Create方法的典型用法代码示例。如果您正苦于以下问题:C# IConnectionFactory.Create方法的具体用法?C# IConnectionFactory.Create怎么用?C# IConnectionFactory.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConnectionFactory
的用法示例。
在下文中一共展示了IConnectionFactory.Create方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TransactionState
public TransactionState(IConnectionFactory factory, CommandRunnerMode mode, IsolationLevel isolationLevel, int commandTimeout)
{
_mode = mode;
_isolationLevel = isolationLevel;
this._commandTimeout = commandTimeout;
Connection = factory.Create();
}
示例2: TransactionState
public TransactionState(IConnectionFactory factory, CommandRunnerMode mode, IsolationLevel isolationLevel)
{
_mode = mode;
_isolationLevel = isolationLevel;
Connection = factory.Create();
Connection.Open();
BeginTransaction();
}
示例3: TransactionState
public TransactionState(IConnectionFactory factory, CommandRunnerMode mode, IsolationLevel isolationLevel)
{
_isolationLevel = isolationLevel;
Connection = factory.Create();
Connection.Open();
if (mode == CommandRunnerMode.Transactional)
{
Transaction = Connection.BeginTransaction(isolationLevel);
}
}
示例4: AdoNetContext
/// <summary>
/// Initializes a new instance of the <see cref="AdoNetContext" /> class.
/// </summary>
/// <param name="connectionFactory">Used to checkout a connection.</param>
public AdoNetContext(IConnectionFactory connectionFactory)
{
_connectionFactory = connectionFactory;
_connection = _connectionFactory.Create();
}
示例5: QulixContext
public QulixContext(IConnectionFactory connectionFactory)
{
_connectionFactory = connectionFactory;
_connection = _connectionFactory.Create();
}
示例6: DevelopmentDocumentSchema
public DevelopmentDocumentSchema(IConnectionFactory connections)
{
_runner = new Lazy<CommandRunner>(() => new CommandRunner(connections.Create()));
}
示例7: Context
public Context(IConnectionFactory connectionFactory)
{
_connection = connectionFactory.Create();
}