Getting the ID(Autonumber) after the session saved in nhibernate?

825 Views Asked by At

Hi i am inserting a row of data into a table through nhibernate, how to get the Id(auto number)of the last inserted row? please help me...

1

There are 1 best solutions below

0
On

Nhibernate do it automatically. If you put in mapping of entity Id generator="native" and set name of required property