Tomboi88 / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

Problem with Insert<T> @@identity and triggers #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In Dapper.Contrib/SqlMapperExtensions.cs

The Insert function should be using scope_identity() rather than @@identity in 
case there are triggers running on the insert of records that insert into or 
update another table with an identity column.

Is there any reason for why it's using @@identity (compatibility perhaps)?

What version are you using? c9160c13fb45

Original issue reported on code.google.com by joseph.a...@gmail.com on 19 Jan 2012 at 11:57