Condividi tramite


Metodo DbExpressionBuilder.GetEntityRef

[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.]

Crea un nuovo oggetto DbEntityRefExpression che recupera il riferimento dell'entità specificata in forma strutturale.

Spazio dei nomi:  System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
<ExtensionAttribute> _
Public Shared Function GetEntityRef ( _
    argument As DbExpression _
) As DbEntityRefExpression
'Utilizzo
Dim argument As DbExpression 
Dim returnValue As DbEntityRefExpression 

returnValue = argument.GetEntityRef()
public static DbEntityRefExpression GetEntityRef(
    this DbExpression argument
)
[ExtensionAttribute]
public:
static DbEntityRefExpression^ GetEntityRef(
    DbExpression^ argument
)
static member GetEntityRef : 
        argument:DbExpression -> DbEntityRefExpression
public static function GetEntityRef(
    argument : DbExpression
) : DbEntityRefExpression

Parametri

Valore restituito

Tipo: System.Data.Entity.Core.Common.CommandTrees.DbEntityRefExpression
Nuovo elemento DbEntityRefExpression che recupera un riferimento all'entità specificata.

Nota sull'utilizzo

In Visual Basic e C# è possibile chiamare questo metodo come metodo di istanza su qualsiasi oggetto di tipo DbExpression. Per chiamare il metodo usando la sintassi del metodo di istanza, omettere il primo parametro. Per altre informazioni, vedere https://msdn.microsoft.com/it-it/library/bb384936(v=vs.113) o https://msdn.microsoft.com/it-it/library/bb383977(v=vs.113).

Eccezioni

Eccezione Condizione
ArgumentNullException

argument è null.

ArgumentException

argument non dispone di un tipo di risultato di entità.

Vedere anche

Riferimento

DbExpressionBuilder Classe

Spazio dei nomi System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder