Condividi tramite


Metodo DbEntityEntry<TEntity>.Reference<TProperty> (String)

[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 un oggetto che rappresenta la proprietà di navigazione di riferimento (cioè non di raccolta) da questa entità a un'altra entità.

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

Sintassi

'Dichiarazione
Public Function Reference(Of TProperty As Class) ( _
    navigationProperty As String _
) As DbReferenceEntry(Of TEntity, TProperty)
'Utilizzo
Dim instance As DbEntityEntry 
Dim navigationProperty As String 
Dim returnValue As DbReferenceEntry(Of TEntity, TProperty)

returnValue = instance.Reference(navigationProperty)
public DbReferenceEntry<TEntity, TProperty> Reference<TProperty>(
    string navigationProperty
)
where TProperty : class
public:
generic<typename TProperty>
where TProperty : ref class 
DbReferenceEntry<TEntity, TProperty>^ Reference(
    String^ navigationProperty
)
member Reference : 
        navigationProperty:string -> DbReferenceEntry<'TEntity, 'TProperty>  when 'TProperty : not struct
JScript does not support generic types and methods.

Parametri di tipo

  • TProperty
    Tipo della proprietà.

Parametri

  • navigationProperty
    Tipo: System.String
    Nome della proprietà di navigazione.

Valore restituito

Tipo: System.Data.Entity.Infrastructure.DbReferenceEntry<TEntity, TProperty>
Oggetto che rappresenta la proprietà di navigazione.

Vedere anche

Riferimento

DbEntityEntry<TEntity> Classe

Overload Reference

Spazio dei nomi System.Data.Entity.Infrastructure