IDbSetExtensions.AddOrUpdate Method
Entity Framework 5.0
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.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
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 be useful when seeding data using Migrations. |
|
AddOrUpdate<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. |