DbSetMigrationsExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A set of extension methods for IDbSet<TEntity>
public static class DbSetMigrationsExtensions
type DbSetMigrationsExtensions = class
Public Module DbSetMigrationsExtensions
- Inheritance
-
DbSetMigrationsExtensions
Methods
AddOrUpdate<TEntity>(IDbSet<TEntity>, Expression<Func<TEntity,Object>>, TEntity[]) |
Adds or updates entities by a custom identification expression when SaveChanges is called. Equivalent to an "upsert" operation from database terminology. This method can useful when seeding data using Migrations. |
AddOrUpdate<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 useful when seeding data using Migrations. |
Applies to
Entity Framework