NHibernate 处理大型模型(大约 1000 个表)的效果如何?
我看过一些关于实体框架如何与大型模型配合使用的讨论 - 最突出的是 这个问题。
但我还没有找到任何关于 NHibernate 处理大型模型的实质性信息 - 有哪些困难,它们不是很难解决吗?
I have seen a few discussions about how well Entity Framework works with large models - most prominently that question.
But I haven't been able to find any substantial information about how well NHibernate handles large models - what are the difficulties, and are they not too hard to work around?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于模型如此之多,会话工厂的构建成本非常昂贵。常见的解决方法是将配置缓存到文件。
IIRC ConfORM 不使用 XML/HBM 配置,因此它可能比 NHibernate/XML 或 Fluent NHibernate 更快在这些场景中。
With that many models, the session factory gets really expensive to build. The common workaround is to cache the configuration to a file.
IIRC ConfORM doesn't use XML/HBM config so it might be faster than NHibernate/XML or Fluent NHibernate in these scenarios.
大型模型应该不会有任何问题。
当然,为了便于维护,您应该使用基于约定的数据映射方法,例如 ConfORM 或 Fluent NHibernate。
There shouldn't be any issues with large models.
Of course, for ease of maintenance, you should use a conventions-based data mapping approach, like ConfORM or Fluent NHibernate.