I have used "code first from db" to create an entity class and include it as the type for a DbSet
in a DbContext
.
But I now have a new problem. I need to build an entity class at runtime that represents a row from an Oracle table/view and then use this class in the same manner as the compile time class (I can use Oracle GetSchema
to provide the information to dynamically create the class type). I want to use it as the type behind a DbSet
and include this DbSet
in a DbContext
.
Can this be done?
Can this DbSet
be added to an existing/initialized DbContext
? Or do I have to create a new DbContext
, somehow add this DbSet
to the DbContext
and then initialize the DbContext
?
I considered using non-generic DbSet
but I read that this is being dropped from EF 7.