Freigeben über


DbContext.Entry<TEntity>-Methode (TEntity)

[Diese Seite bezieht sich auf Entity Framework Version 6. Die neueste Version ist als 'Entity Framework' NuGet-Paket verfügbar. Weitere Informationen zu Entity Framework finden Sie unter msdn.com/data/ef.]

Ruft ein DbEntityEntry<TEntity>-Objekt für die angegebene Entität ab, um Zugriff auf Informationen zur Entität und die Fähigkeit zum Ausführen von Aktionen für die Entität bereitzustellen.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
Public Function Entry(Of TEntity As Class) ( _
    entity As TEntity _
) As DbEntityEntry(Of TEntity)
'Usage
Dim instance As DbContext 
Dim entity As TEntity
Dim returnValue As DbEntityEntry(Of TEntity)

returnValue = instance.Entry(entity)
public DbEntityEntry<TEntity> Entry<TEntity>(
    TEntity entity
)
where TEntity : class
public:
generic<typename TEntity>
where TEntity : ref class 
DbEntityEntry<TEntity>^ Entry(
    TEntity entity
)
member Entry : 
        entity:'TEntity -> DbEntityEntry<'TEntity>  when 'TEntity : not struct
JScript does not support generic types and methods.

Typparameter

  • TEntity
    Der Typ der Entität.

Parameter

  • entity
    Typ: TEntity
    Die Entität.

Rückgabewert

Typ: System.Data.Entity.Infrastructure.DbEntityEntry<TEntity>
Ein Eintrag für die Entität.

Siehe auch

Verweis

DbContext Klasse

Entry-Überladung

System.Data.Entity-Namespace