Condividi tramite


Metodo DbExpressionBuilder.Property (DbExpression, EdmProperty)

[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à specificata.

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

Sintassi

'Dichiarazione
<ExtensionAttribute> _
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification := "required for this feature")> _
Public Shared Function Property ( _
    instance As DbExpression, _
    propertyMetadata As EdmProperty _
) As DbPropertyExpression
'Utilizzo
Dim instance As DbExpression 
Dim propertyMetadata As EdmProperty 
Dim returnValue As DbPropertyExpression 

returnValue = instance.Property(propertyMetadata)
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")]
public static DbPropertyExpression Property(
    this DbExpression instance,
    EdmProperty propertyMetadata
)
[ExtensionAttribute]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters", Justification = L"required for this feature")]
public:
static DbPropertyExpression^ Property(
    DbExpression^ instance, 
    EdmProperty^ propertyMetadata
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "required for this feature")>]
static member Property : 
        instance:DbExpression * 
        propertyMetadata:EdmProperty -> DbPropertyExpression
public static function Property(
    instance : DbExpression, 
    propertyMetadata : EdmProperty
) : DbPropertyExpression

Parametri

Valore restituito

Tipo: System.Data.Entity.Core.Common.CommandTrees.DbPropertyExpression
Nuovo elemento DbPropertyExpression che rappresenta il recupero della proprietà.

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

propertyMetadata è Null o instance è Null e la proprietà non è statica.

Vedere anche

Riferimento

DbExpressionBuilder Classe

Overload Property

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