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);
精彩评论