确定遗留LINQ代码中表的位置 [英] Determine where table exists in legacy LINQ code

查看:49
本文介绍了确定遗留LINQ代码中表的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了一天的时间进行研究,但无法解决这个问题。 


我在Visual Studio中有一个服务项目,距离我之前已有几年了开始在这里工作。


有一个dbml文件,其中LINQ代码引用一个表,在这种情况下为dbo.Mail。我搜索了dbml属性,设计器代码,app.config,Mail类,并且无法确定该表的存在位置。 IE,它存在什么服务器和数据库。我的意思是,我
知道它必须是开发服务器,但我查看了所有的数据库,没有一个有dbo.Mail表。有人知道LINQ或应用程序本身是否在将表格拖到dbml GUI上时将这些信息存储在某个地方,当类是
时自动创建?



非常感谢你的帮助!


詹姆斯

解决方案

所有你能做的就是看在connectionstring处确定指向我所在表的数据库的服务器名称和目录名称。  

I've spent a day researching and can't figure this out. 

I have a service project in Visual Studio that is several years old from before I started working here.

There is an dbml file where the LINQ code refers to a table, dbo.Mail in this case. I've searched the dbml property, designer code, app.config, Mail class, and can't figure out where this table exists. IE, what server and database it exists in. I mean, I know it has to be the dev server but I've looked at all the databases and none of them have a dbo.Mail table. Does anyone know if LINQ or the application itself stores this information somewhere when the table is dragged onto the dbml GUI when the class is automatically created?

Many thanks for the help!

James

解决方案

All you can do is look at the connectionstring to determine the server name and catalog name pointing to the database the table my be on.  


这篇关于确定遗留LINQ代码中表的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆