Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IDbSetExtensions Class

Entity Framework 5.0

A set of extension methods for IDbSet<TEntity>.

System.Object
  System.Data.Entity.Migrations.IDbSetExtensions

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

public static class IDbSetExtensions

  NameDescription
Public methodStatic memberAddOrUpdate<TEntity>(IDbSet<TEntity>, TEntity[])Adds or updates entities by key when SaveChanges is called. Equivalent to an "upsert" operation from database terminology. This method can be useful when seeding data using Migrations.
Public methodStatic memberAddOrUpdate<TEntity>(IDbSet<TEntity>, Expression<Func<TEntity, Object>>, TEntity[])Adds or updates entities by key when SaveChanges is called. Equivalent to an "upsert" operation from database terminology. This method can be useful when seeding data using Migrations.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft