View Single Post
  #1 (permalink)  
Old July 17th, 2009, 04:33 PM
jmartarelli jmartarelli is offline
Registered User
 
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linq to Sql - Retrieving the value of an identity column BEFORE inserting register

Hello, I'm wondering if there is a way to retrieve the identity value from an identity column before saving a new register.
When I run this query: "SELECT IDENT_CURRENT ('alpa_Animais') AS AnimalID" directly, using the SQL Server Management Studio I get this value.
Does anyone know if there is a way to get this from a method inside a web app using Linq?
Thank you
Josi