Stop SCOPE_IDENTITY on Framework Entity insert

We are currently doing several inserts in our application where we do not need the ID that is generated from this insert.

After looking at the SQL profiler after insert there is always a SCOPE_IDENTITY statement to return the ID for the object, on load this affects performance and creates database locks that are not needed.

Is there a way to ask Entity Framework to add an entity without updating the id?

+3
c # entity-framework


source to share


No one has answered this question yet

Check out similar questions:

783
Entity Framework vs LINQ to SQL
758
Entity Framework 5 Record Update
630
Fastest way to insert into Entity framework
515
How can I get the ID of the inserted entity in the Entity framework?
401
Entity Framework Service Provider not found for ADO.NET Provider with invariant name 'System.Data.SqlClient'
323
Are there zombies ... in .NET?
254
Entity Framework: "Unexpected row count (0) was affected by an update, insert, or delete statement."
115
How do I recreate the database for Entity Framework?
2
How can I call SaveChanges on an entity structure without selecting scope_identity on the insert?
1
Entity Framework 6: Insert or Update



All Articles
Loading...
X
Show
Funny
Dev
Pics