views:

66

answers:

1

Hi,

I am added a record in my table e.g. Orders. After adding the record i want to get the newly generated ID of the inserted record. Like SCOPEIDENTY in SQL.

But how can i do this in Entity Framework.

+2  A: 

After you saved your changes, your entity object should reflect the newly generated ID automagically. It's one of the many great things about the Entity Framework. :-)

Prutswonder
Thanks I got it. I was thinking on wrong side :-)Ya its a good think. :-)
Waheed