Book Image

Learning NHibernate 4

Book Image

Learning NHibernate 4

Overview of this book

Table of Contents (18 chapters)
Learning NHibernate 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Feature 3 – searching employees


The last feature that we are going to look at is an ability to search employees in the system. I have seen largest number of variations in the implementation of search features across different systems. The variations are in the way it works, the way results are displayed to end user, and also the complexity of the actual search. Let's begin with the most simple search.

Note

The purpose of this section is not to show you how to implement a search functionality. If you have gone through Chapter 6, Let's Retrieve Some Data from the Database, then you know that implementing search feature comes down to building some queries using ISession and utilizing pagination features offered by ISession. The intent of this section is to show you some limitations of repository pattern. So we will run through the simplest implementation without beating around the bush and discuss issues with repository pattern in the end.

We will implement a feature to search employees by their...