zzz projects Entity Framework 6 EF 6
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

3 results for: in tag: identity-insert

Using IDENTITY_INSERT with EF4

I am trying to create a record in the db that has a predefined primary key value. I know how to do this with sql, but I was wondering if EF can do this for me? Otherwise, I will have to create a stored proc for the inserts.
entity-framework identity-insert
asked by Paul Knopf

Why does this EF insert with IDENTITY_INSERT not work?

This is the query:...using (var db = new AppDbContext()) { var item = new IdentityItem {Id = 418, Name = "Abrahadabra" }; db.IdentityItems.Add(item); db.Database.ExecuteSqlCommand("SET IDENTITY_INSERT Test.Items ON;"); db.SaveChanges(); } ...
c# entity-framework entity-framework-6 identity-insert
asked by ProfK

Cannot insert explicit value for identity column while updating entity

I am using ASP.NET Boilerplate template....I want to update ...Details... table, which contains more than one item. If an item exists, it must update, otherwise a new one must be added and all other entries relating to ...Master... primary key in ...Detai...
aspnetboilerplate entity-framework entity-framework-6 identity-insert
asked by Nighil

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

Try for free now