Possible Duplicate:
Instead of trigger in SQL Server - looses SCOPE_IDENTITY?
On SQL Server 2008, I have an INSTEAD OF trigger on a view. The SCOPE_IDENTITY()
after the trigger is results in null
. This causes problems with the libraries we're using. How can I control SCOPE_IDENTITY from within my trigger?
This is absolutely needed by Entity Framework in order to get back the ID value of the last inserted row.
Thanks!