2

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.

5
  • what "Oracle PL/SQL Sequence issue " are you talking about? Commented Jan 16, 2015 at 10:59
  • select nextval from sequence before inserting the entity Commented Jan 16, 2015 at 12:05
  • 2
    Why 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... Commented Feb 11, 2015 at 3:43
  • Oracle 12c supports auto incrementing sequences . Look at this answer stackoverflow.com/questions/11296361/… Commented May 8, 2015 at 5: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. Commented May 11, 2015 at 13:38

1 Answer 1

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:

Entity framework connection with oracle databse

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.