Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use EF to generate sequences on insert

neil-scalesApr 21 2023

My existing database uses sequences to generate primary key values. The previous version of the product manually calls SELECT <sequence>.NEXTVALUE FROM DUAL to generate the PK and add it directly to the model.

There should be a way to configure EF such that it automatically gets the next value using the sequence, but without modifying the database.

I'm happy to create a value generator, but I would assume there is already one, but I can't find it.

Comments
Post Details
Added on Apr 21 2023
2 comments
1,199 views