I am using the DevArt dot connect for oracle (Version: 18.104.22.168).
I am using the DevArt Entity Model to create the entities.
I have some tables which will be generated on daily basis (Eg:TableName_Date).
All tables will have the same fields.
I need to get the data from the tables when we give the Date. Here I wanted to use only one model to get the data from all the tables by changing the table name in the Model dynamically.
I am able to do this with the code first approach using the the Ado .Net Data Entity model, by recompiling the model in the DbContext class after changing the table name as below.
Code: Select all
DbModelBuilder builder = new DbModelBuilder(DbModelBuilderVersion.V4_1); builder.Configurations.Add(new EntityTypeConfiguration()); builder.Conventions .Remove(); builder.Conventions .Remove(); builder.Entity().ToTable(TableName, "TestDatabase"); var dbModel = builder.Build(new Devart.Data.Oracle.OracleConnection("connection string")); var CompiledModel = dbModel.Compile();
Do we have any way to update the Model dynamically which is created using the DevArt Entity Model.
Also, I tried to use the Select stored procedure with the DevArt Entity Model but I am facing some problems with this. Can you give please provide some reference to use the "Select" stored procedure with the DevArt Entity Model. In my project I am using Entity Framework 4.1 and DevArt ((Version: 22.214.171.124)