更新时间:2023-01-01 08:34:07
它比上面的要容易得多,而且不需要反思.Linq to SQL 有一个 Mapping 属性,您可以使用它来获取所有表的枚举.
It's much easier than above and no reflection required. Linq to SQL has a Mapping property that you can use to get an enumeration of all the tables.
context.Mapping.GetTables();