DbConnection.BeginTransaction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts a database transaction.
Overloads
BeginTransaction() |
Starts a database transaction. |
BeginTransaction(IsolationLevel) |
Starts a database transaction with the specified isolation level. |
Remarks
If you do not specify an isolation level, the default isolation level for the specific type of connection is used.
BeginTransaction()
- Source:
- DbConnection.cs
- Source:
- DbConnection.cs
- Source:
- DbConnection.cs
Starts a database transaction.
public:
System::Data::Common::DbTransaction ^ BeginTransaction();
public System.Data.Common.DbTransaction BeginTransaction ();
member this.BeginTransaction : unit -> System.Data.Common.DbTransaction
Public Function BeginTransaction () As DbTransaction
Returns
An object representing the new transaction.
Remarks
If you do not specify an isolation level, the default isolation level for the specific type of connection is used.
See also
Applies to
BeginTransaction(IsolationLevel)
- Source:
- DbConnection.cs
- Source:
- DbConnection.cs
- Source:
- DbConnection.cs
Starts a database transaction with the specified isolation level.
public:
System::Data::Common::DbTransaction ^ BeginTransaction(System::Data::IsolationLevel isolationLevel);
public System.Data.Common.DbTransaction BeginTransaction (System.Data.IsolationLevel isolationLevel);
member this.BeginTransaction : System.Data.IsolationLevel -> System.Data.Common.DbTransaction
Public Function BeginTransaction (isolationLevel As IsolationLevel) As DbTransaction
Parameters
- isolationLevel
- IsolationLevel
One of the enumeration values that specifies the isolation level for the transaction to use.
Returns
An object representing the new transaction.
See also
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈