在哪里可以找到MyGeneration常用的所有接口的列表?
(我特别要求学习如何使用foreach循环遍历DataBase中的所有表)
发布于 2011-06-29 23:23:26
我希望你有一些通用的方法来标识你的实体类(比如公共基类,或者实现的接口)。然后,您可以执行如下反射查询:
from t in typeof(Entity).Assembly.ExportedTypes
where typeof(Entity).IsAssignableFrom(t) || t.GetInterfaces.Any(i => i == typeof(CommonInterface))
select t手头没有编译器,但这是大方向。
发布于 2011-06-30 00:55:43
如果您询问有关MyGeneration Code Generator的信息,您可能需要数据库的接口模型找到了here in the My Generation svn Repository
https://stackoverflow.com/questions/6522191
复制相似问题