Condividi tramite


Proprietà DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Ottiene o imposta il valore che determina se le funzioni e i comandi SQL devono essere sempre eseguiti in una transazione.

Spazio dei nomi:  System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
Public Property EnsureTransactionsForFunctionsAndCommands As Boolean 
    Get 
    Set
'Utilizzo
Dim instance As DbContextConfiguration 
Dim value As Boolean 

value = instance.EnsureTransactionsForFunctionsAndCommands

instance.EnsureTransactionsForFunctionsAndCommands = value
public bool EnsureTransactionsForFunctionsAndCommands { get; set; }
public:
property bool EnsureTransactionsForFunctionsAndCommands {
    bool get ();
    void set (bool value);
}
member EnsureTransactionsForFunctionsAndCommands : bool with get, set
function get EnsureTransactionsForFunctionsAndCommands () : boolean 
function set EnsureTransactionsForFunctionsAndCommands (value : boolean)

Valore proprietà

Tipo: System.Boolean
Comportamento predefinito della transazione.

Note

Questo flag determina se verrà avviata una nuova transazione quando metodi come ExecuteSqlCommand(String, Object[]) vengono eseguiti all'esterno di una transazione. Si noti che questo non implica la modifica del comportamento del metodo SaveChanges().

Vedere anche

Riferimento

DbContextConfiguration Classe

Spazio dei nomi System.Data.Entity.Infrastructure