Get Newly generated ID (i.e. scopeIdentity) in Entity FrameWork

前端 未结 1 1438
挽巷
挽巷 2021-01-13 06:01

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

相关标签:
1条回答
  • 2021-01-13 06:27

    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. :-)

    0 讨论(0)
提交回复
热议问题