I have a legacy code base written in .NET
It has a web.config with various connection strings defined to an oracle database. I have altered its QA environment connection string to point to my own oracle database located in a VM. (The schema of both the database is same)
I am able to use its existing class like XYZDbModelEntity which extends ObjectContext using which I can query existing models like,
using(XYZDbModelEntity ctx = new XYZDbModelEntity(EnvironmentAwareSettings.EFDatabaseConnectionString))
{
info = ctx.SOME_SCHEDULE
.Include("TIME")
.FirstOrDefault(c => c.ID == ID);
}
Now I have added a table in the existing database (on my VM) and I need it to be picked up with this application, but I am not sure how to go about doing this. I have a XYZDbModel.edmx file and a XYZDbModel.tt file that has a lot of .cs files which probably correspond to my tables...
I do not know if I have provided enough information... Any pointers in how to go about doing this will be immensely helpful.
Thanks :)
这很简单,只需在解决方案资源管理器中双击XYZDbModel.edmx文件,然后在实体模型设计器中右键单击空白空间,然后选择“从数据库更新模型”,然后选择需要添加的表即可。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.