Share via


DbContextExtensions.AttachAsModified Method (, Object, Object, )

[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 ( _
    dbSet As DbSet, _
    current As Object, _
    original As Object, _
    dbContext As DbContext _
)
public static void AttachAsModified(
    this DbSet dbSet,
    Object current,
    Object original,
    DbContext dbContext
)
[ExtensionAttribute]
public:
static void AttachAsModified(
    DbSet^ dbSet, 
    Object^ current, 
    Object^ original, 
    DbContext^ dbContext
)
static member AttachAsModified : 
        dbSet:DbSet * 
        current:Object * 
        original:Object * 
        dbContext:DbContext -> unit 
public static function AttachAsModified(
    dbSet : DbSet, 
    current : Object, 
    original : Object, 
    dbContext : DbContext
)

Parameters

  • dbSet
    Type: DbSet
    The DbSet to attach to.
  • dbContext
    Type: DbContext
    The corresponding DbContext.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DbSet. 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).

Remarks

This is a non-generic version.

See Also

Reference

DbContextExtensions Class

AttachAsModified Overload

System.Web.Http.Data.EntityFramework Namespace