DbContextExtensions.AttachAsModified Method (, 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.
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, _
entity As Object, _
dbContext As DbContext _
)
public static void AttachAsModified(
this DbSet dbSet,
Object entity,
DbContext dbContext
)
[ExtensionAttribute]
public:
static void AttachAsModified(
DbSet^ dbSet,
Object^ entity,
DbContext^ dbContext
)
static member AttachAsModified :
dbSet:DbSet *
entity:Object *
dbContext:DbContext -> unit
public static function AttachAsModified(
dbSet : DbSet,
entity : Object,
dbContext : DbContext
)
Parameters
- dbSet
Type: DbSet
The DbSet to attach to.
- entity
Type: System.Object
The current entity.
- 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 overload can be used in cases where the entity has a Timestamp member. This is a non-generic version.