日期:2014-05-20 浏览次数:20721 次
我以Northwind库为例: 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 */