开发者

LINQ query to get All objects information from given database in ASP.NET?

I ha开发者_如何学Gove a requirement that, I populate all database in one DropDownList and when i changed the database name. I need to display all objects present in the database into a gridview. I need to do it in LINQ to SQl could any one please help me to solve this problem?

Thanks and Regards, G. Kiran


I found this code somewhere

Northwind db = ...from somewhere
var model = db.Mapping;
foreach (var mt in model.GetTables())
   Console.WriteLine(mt.TableName);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜