markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

Getting back @@Identity #259

Closed bbarvish closed 11 years ago

bbarvish commented 11 years ago

What is the best way to execute an Insert and get back the @@Identity that was just created?

markrendle commented 11 years ago

Inserts return the newly inserted row, including any values set by the database, such as identity columns or columns with default values.

bbarvish commented 11 years ago

Outstanding! Thanks.

Those who start wars never fight them. Those who fight wars never like them.

On Feb 2, 2013, at 16:15, Mark Rendle notifications@github.com wrote:

Inserts return the newly inserted row, including any values set by the database, such as identity columns or columns with default values.

— Reply to this email directly or view it on GitHub.