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!

EnityFrameworkCore 2.19.3

User_9T3JGAug 1 2019 — edited Aug 2 2019

Hello,

I have been succesfully using EF for a while, but I ran into poblem with it.

Tables are getting scaffolded right, but till DateTime comes in place.

In table column is called

CREATED_DATE

in class: 

public DateTime? CreatedDate { get; set; }

in context

entity.Property(e => e.CreatedDate)

                    .HasColumnName("CREATED_DATE")

                    .HasColumnType("DATE")

                    .HasDefaultValueSql("NULL");

but when I call save changes I get this error:

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00904: "t"."CreatedDate": invalid identifier

I have no idea if I can fix it, or why it generates the name column as CreatedDate, when it is right in context.

Any ideas please?

Comments
Post Details
Added on Aug 1 2019
3 comments
449 views