开发者

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

开发者 https://www.devze.com 2022-12-19 06:09 出处:网络
I ha开发者_如何学Gove a requirement that, I populate all database in one DropDownList and when i changed the database name.

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

精彩评论

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