Skip to content

Lotpath/Querify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Querify

Querify provides helpful abstractions and extensions over NHibernate such as:

  • A powerful Repository abstraction that simplifies data access and testing scenarios
  • Extension methods on IQueryable that guide you toward the pit of success (paging instead of "fetch all" scenarios, automatic lazy loading and multi-fetch)
  • A flexible specification based querying approach for building up complicated Linq queries that are easy for client code to invoke without bleeding nasty Linq expressions further up your stack
  • Eager fetching abstraction that keeps NHibernate out of your core domain while allowing you to leverage Eager fetching (preventing n+1 problems)

It is recommended that you not work directly with an IRepository outside of your core domain, but instead implement service, manager and engine classes in your core domain which take a dependency on IRepository. Client code of your domain should interact with your services, managers and engines rather than directly with the IRepository abstraction.

Querify fully embraces the concept of an Onion Architecture where your core Domain is the center of the Onion, and the IRepository is merely a service (or a Port/Adapter in Hexagonal architecture parlance), making data access a service rather than the "base" or "foundation" of your application.

Usage

Querify is available on NuGet:

Querify is the core project, intended to be referenced by your core domain project.

Querify.Nh provides a repository implementation for NHibernate

Querify.Nancy.Nh provides hooks to configure a Nancy application to work with NHibernate and Querify

Possible Future Enhancements

  • An example domain project, highlighting how you can leverage the onion architecture approach and test your domain with the InMemoryRepository
  • Improved unit and integration test coverage
  • maybe an EntityFramework implementation of IRepository (I did said maybe)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published