I'm trying to work with EF CodeFirst under Oracle with ODP.net. This is my DbContext class:
public class MyCEContext : DbContext {
public DbSet<Person> Persons { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder) {
modelBuilder.Entity<Person>().ToTable("PERSONS","myce");
}
public MyCEContext() :
base(new OracleConnection(
"Data Source=cebd; User ID=myce; Password=****;"), true) {}
}
Problem is that when I try to do something like this:
MyCEContext context = new MyCEContext();
Person p = context.Persons.Find(1);
I get this inner error:
{"ORA-00942: table or view does not exist"}
And the table exists.
What am I doing wrong?