Main

Repositories

Introduction

Custom Repositories

You are highly recommended to build your own custom repositories, based on the generic
Repository class. This allows for a much smoother and useful interface in your application,
as well as hiding irrelevant implementation details.
   1:  public class OrderRepository : Repository
   2:  {
   3:      public IEnumerable<Book> GetTop5BestSellingBooksThisYear()
   4:      {
   5:          return base.GetMany<Book>("Top5SellingBooks", Field.Equals("Year", DateTime.Now.Year));
   6:      }
   7:  }