Monthly Archives: July 2017

Entity Framework Generic Repository

Introduction A generic Entity Framework repository pattern implementation. Code https://github.com/jinweijie/EF.GenericRepository Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Base Repository The base repository exists in Common\AbstractRepository.cs, it handles the basic CRUD operations, for example, methods like… Read More »

Dapper Custom Pagination Sample

Introduction Sample for custom pagination using Dapper. Supporting sorting + criteria + pagination. Source Code https://github.com/jinweijie/Dapper.PagingSample Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Caller sample: Tuple<IEnumerable<Log>, int> Find(LogSearchCriteria criteria , int pageIndex , int pageSize… Read More »