Instead of trigger in SQL Server - looses SCOPE_IDENTITY?
On SQL Server 2008, I've an Rather Than trigger on the view. The
SCOPE_IDENTITY() following the trigger is leads to
null. This will cause issues with the libraries we are using. How do i control SCOPE_IDENTITY from inside my trigger?
This really is absolutely required by Entity Framework to be able to return the ID worth of the final placed row.
You do not - it's SCOPE_IDENTITY() 'cause it returns the identity inside the current scope - the trigger is performed inside a different scope, which means you can't aspire to get hold of the identity with SCOPE_IDENTITY(). @@IDENTITY is exactly what you are after - when the framework can't deal with this then you are at a complete loss.