Apr 11, 2012 04:13 AM|kidshaw|LINK
Just be wary of what happens when concurrent inserts happen. SCOPE_IDENTITY in SQL Server returns the IDENTITY result of the last insert in the current scope. If two inserts occur before the first IDENTITY is returned, it doesn't matter as they are scoped.
Make sure this method is scope aware, otherwise it will be subject to this pitfall and you could theretically end up with child records linked to the wrong master record.
For small scale applications, it possibly won't be an issue - or at least it won't occur for some time. But if your system is going to scale up - this could be a nightmare to resolve later on.
Hope this helps