Metodo DbExpressionBuilder.Property (DbExpression, NavigationProperty)
[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 DbPropertyExpression che rappresenta il recupero della proprietà di navigazione specificata.
Spazio dei nomi: System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification := "required for this feature")> _
<ExtensionAttribute> _
Public Shared Function Property ( _
instance As DbExpression, _
navigationProperty As NavigationProperty _
) As DbPropertyExpression
'Utilizzo
Dim instance As DbExpression
Dim navigationProperty As NavigationProperty
Dim returnValue As DbPropertyExpression
returnValue = instance.Property(navigationProperty)
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")]
public static DbPropertyExpression Property(
this DbExpression instance,
NavigationProperty navigationProperty
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters", Justification = L"required for this feature")]
[ExtensionAttribute]
public:
static DbPropertyExpression^ Property(
DbExpression^ instance,
NavigationProperty^ navigationProperty
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")>]
static member Property :
instance:DbExpression *
navigationProperty:NavigationProperty -> DbPropertyExpression
public static function Property(
instance : DbExpression,
navigationProperty : NavigationProperty
) : DbPropertyExpression
Parametri
- instance
Tipo: System.Data.Entity.Core.Common.CommandTrees.DbExpression
Istanza da cui recuperare la proprietà di navigazione.
- navigationProperty
Tipo: System.Data.Entity.Core.Metadata.Edm.NavigationProperty
Metadati per la proprietà di navigazione da recuperare.
Valore restituito
Tipo: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression
Nuovo elemento DbPropertyExpression che rappresenta il recupero della proprietà di navigazione.
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 | navigationProperty è Null o instance è Null. |
Vedere anche
Riferimento
Spazio dei nomi System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder