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!

Identity field in Oracle 11.2 with EF6

user9517020Jan 22 2015 — edited Jan 27 2015

Hi,

I am in model first and I need to use Identity field to generate PK

This is my code

        using (var ctx = new Model14Container())
        {
            var newElem = ctx.Entity12.Add(new Entity12());
            ctx.SaveChanges();

            var elem = ctx.Entity12.FirstOrDefault();
        }

The Id is always 0. And I have a PK error the second time

I use Generate Oracle Via T4 (TPT).xaml (VS) and SSDLToOracle.tt (VS) in VS2013 with ODP 12c release3

The SQL code is generated without sequence

I tried with Devart and I had no problem

Thanks

Romain

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2015
Added on Jan 22 2015
6 comments
3,286 views