Entityframework - Error table or view does not exist

Asked

Viewed 33 times

0

I have a table in oracle that can only be accessed this way sms."User", when mapping the entity, I did so:

builder.ToTable("sms.Usuario")

When running the project and seeing the log, I see that the EF generates this way for me

FROM "sms.Usuario"

This way causes an error of 'table does not exist'.

How do I solve this problem?

1 answer

1


I don’t know Oracle well, but drawing a parallel to SQL server, I would say that the correct notation would be

... FROM "sms"."Usuario"

Where Usuario is the table and sms is the DB schema.

Therefore, you need to change the Overload used in the Entity framework configuration to

ToTable("Usuario", "sms")
  • I knew I was doing it the wrong way, because I had to do it a few years ago, but I forgot and I didn’t remember what that called (DB Schema)... I really appreciate the help :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.