简体   繁体   English

使用NHibernate访问数据库时,最佳的业务模型是什么?

[英]What is the best businessmodel when using NHibernate to access the database?

I'm starting to use NHiberante as a dataaccess tier. 我开始使用NHiberante作为数据访问层。
I'm used to work with the repository model as a business model. 我曾经将存储库模型用作业务模型。

This means, my domain model (not really a tier), my asp.net application tier, my repository tier which finally uses my dataaccess tier. 这意味着,我的域模型(实际上不是一个层),我的asp.net应用程序层,我的存储库层(最终使用了我的数据访问层)。

But with what I've learned by now (on NHibernate) I know that many logic is done within an ISession so I was wondering if NHibernate could be used within the repository tier. 但是根据我现在(在NHibernate上)学到的知识,我知道ISession中完成了很多逻辑,所以我想知道NHibernate是否可以在存储库层中使用。

Or perhaps there are even better ways to use NHibernate. 也许还有使用NHibernate的更好方法。 Does anyone know where I could find a propriate example of how to use NHibernate in an webapplication? 有谁知道我在哪里可以找到如何在Web应用程序中使用NHibernate的示例?

Cheers, M. 干杯,M。

S#arp体系结构是使用NHibernate的完整示例或Web体系结构。

You can use Nhibernate with Linq extension. 您可以将Nhibernate与Linq扩展一起使用。 By using Linq, you can write your logic in your service layer and repository only get items IQuerable. 通过使用Linq,您可以在服务层中编写逻辑,并且存储库仅获取IQuerable项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用NHibernate在SQL数据库中存储字节数组的最佳方法是什么? - What is the best way to store byte array in SQL database using NHibernate? 使用MVC 4和Entity Framework 6访问大型数据库的最佳方法是什么 - What is the best method to access a large database using MVC 4 and Entity Framework 6 在 NHibernate 中制作数据访问方法的最佳方法是什么? - What is the best approach to make data access methods in NHibernate? ASP.NET中重用MS Access迁移到SQL Server的数据库连接的最佳做法是什么? - What is the best practice in ASP.NET for re-using a database connection for MS Access migrating to SQL server? 使用NHibernate插入或保存时为Object Proxies提供什么值 - What value to give for Object Proxies when Inserting or Saving using NHibernate 什么是访问不同引擎但结构相似的不同数据库的最佳方法 - What is best way access different database on different engine but with similar structure 在NHibernate中映射此方案的最佳方法是什么? - What would be the best way to map this scenario in NHibernate? 在NHibernate中进行热切联接的最佳方法是什么? - What is the best way to do eager joins in NHibernate? 在Linq to NHibernate中测试状况的最佳方法是什么? - What is the best way to test a condition in Linq to NHibernate? 在多个项目中重用数据库访问以确保更新后不会破坏任何项目的最佳方法是什么? - What's the best way to reuse database access across multiple projects to ensure that when updated it does not break any projects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM