p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional ADO.NET 3.5 with LINQ and the Entity Framework ISBN: 978-0-470-22988-0 (http://p2p.wrox.com/book-professional-ado-net-3-5-linq-entity-framework-isbn-978-0-470-22988-0-482/)
-   -   Linq to Sql - Retrieving the value of an identity column BEFORE inserting register (http://p2p.wrox.com/book-professional-ado-net-3-5-linq-entity-framework-isbn-978-0-470-22988-0/75312-linq-sql-retrieving-value-identity-column-before-inserting-register.html)

jmartarelli July 17th, 2009 04:33 PM

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


All times are GMT -4. The time now is 02:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.