日期:2014-05-17 浏览次数:20376 次
void Main()
{
var constr = @"Data Source=.;Initial Catalog=Northwind;Integrated Security=True";
var context = new DataContext(constr) ;
string[] ss=context.ExecuteQuery<string>("select name from sysobjects where xtype='u'").ToArray();
foreach(string s in ss)
{
Console.WriteLine(s);
}
}
/*
Orders
Products
Order Details
CustomerCustomerDemo
CustomerDemographics
Region
Territories
EmployeeTerritories
dtproperties
sysdiagrams
Employees
Categories
Customers
Shippers
Suppliers
*/