ObjectContextExtensions.AttachAsModified<TEntity> Method (ObjectSet<TEntity>, TEntity, TEntity)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Attaches the specified entity as modified, with the specified original state.

Namespace:  System.Web.Http.Data.EntityFramework
Assembly:  System.Web.Http.Data.EntityFramework (in System.Web.Http.Data.EntityFramework.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub AttachAsModified(Of TEntity As Class) ( _
    objectSet As ObjectSet(Of TEntity), _
    current As TEntity, _
    original As TEntity _
)
public static void AttachAsModified<TEntity>(
    this ObjectSet<TEntity> objectSet,
    TEntity current,
    TEntity original
)
where TEntity : class
[ExtensionAttribute]
public:
generic<typename TEntity>
where TEntity : ref class
static void AttachAsModified(
    ObjectSet<TEntity>^ objectSet, 
    TEntity current, 
    TEntity original
)
static member AttachAsModified : 
        objectSet:ObjectSet<'TEntity> * 
        current:'TEntity * 
        original:'TEntity -> unit  when 'TEntity : not struct
JScript does not support generic types or methods.

Type Parameters

  • TEntity
    The entity Type.

Parameters

  • current
    Type: TEntity
    The current entity state.
  • original
    Type: TEntity
    The original entity state.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ObjectSet<TEntity>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ObjectContextExtensions Class

AttachAsModified Overload

System.Web.Http.Data.EntityFramework Namespace