Is there any way to solve the .Net Entity Framework Oracle PL/SQL Sequence issue without trigger, while inserting data ? Interceptor should be a method for this but which way do you suggest? Thnx.
Asked
Active
Viewed 5,451 times
2
-
what "Oracle PL/SQL Sequence issue " are you talking about? – Sathyajith Bhat Jan 16 '15 at 10:59
-
select nextval from sequence before inserting the entity – eozcan Jan 16 '15 at 12:05
-
2Why the -1 vote? This is a very important question for Oracle users since it is the only database that 'requires' you to setup the auto-incrementing sequence for 'Identity' fields. I would like to see an Oracle DBA/programmer answer this question... – FrankO Feb 11 '15 at 03:43
-
Oracle 12c supports auto incrementing sequences . Look at this answer http://stackoverflow.com/questions/11296361/how-to-create-id-with-auto-increment-on-oracle#answer-24222811 – Ovidiu Buligan May 08 '15 at 05:47
-
Yep, Oracle 12c solves this problem but it seems using trigger is the single way to solve this problem on 11g. @Ovidiu if you can post your comment as a answer I will check solved this question, however it doesn't meet my expectations. – eozcan May 11 '15 at 13:38
1 Answers
2
Oracle 12c adds support for autoincrementing sequences : How to create id with AUTO_INCREMENT on Oracle?
Until then there is not much to do but to use triggers . I have a sample project with ef 6 and oracle 11g only with nuget packages(works also in linux), check out my answer from this question:

Community
- 1
- 1

Ovidiu Buligan
- 2,784
- 1
- 28
- 37