Am I right that using NHibernate (or any other ORM) removes the necessity of DAL?
Or not?
Am I right that using NHibernate (or any other ORM) removes the necessity of
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need a DAL, the question is what do you do in the DAL. In a .NET project with NHibernate, I use this organisation
I give you an example, I’d like get all active Employee and sort them.
in my UI, I call MyProject.Service.EmployeeService.GetActive(); in getGetActive, I call a function in PyProject.Repo to get active employee. When I have the result back (in the service method), I do an order with Linq and return the list ordered.
To resume, the Repo project, it’s access DB via NHibernate and Service it’s the business.
It’s my opinion, it’s like this I do it’s may be not the best way, not the only way, but it’s my way 🙂