在亚音速中具有相同结构的多个表上使用相同的类别
我使用 Subsonic 3,发现它是一个非常棒的工具,它对我帮助很大!
在我的新项目中,我不仅想使用它以“1 c# 类到 1 表模式”进行映射,而且还希望为具有相同结构的多个表提供通用映射。为了更清楚地说明:我在运行时创建表,该表的结构完全相同(注意,它必须相同,该表必须是单独的表)。是否可以通过创建通用类在这些表之间建立通用映射,通过该类我可以对所有这些表进行查询操作?例如,这个类可以将表名作为输入参数,并且类对该表进行操作。
预先感谢,抱歉我的英语不好,我希望你能理解我的问题。
I use Subsonic 3 and found it a really great tool, it helped me a lot!
In my new project I would like to use it not only make mappings in '1 c# class to 1 table mode', but I would like to have a common mapping for several tables with the same structure. To make it clearer: I create tables runtime, structure of this tables are totally the same (note, it must be the same, this tables MUST be seperate ones). Is it possible to have a common mapping between these tables with creating a generic class, by which I can make query operations on all these tables? E.g. this class could have table name as an input parameter, and class makes operations on this table.
Thanks in advance, sorry about my English, I hope you understand my question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果不对模板和代码库进行广泛修改,这是不可能的。不要与你的工具作斗争;如果这就是您所需要的,那么 SubSonic 就是错误的选择。
That is not possible without extensive modification to both the templates and the code-base. Don't fight your tool; if this is what you need SubSonic is the wrong choice.