Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.