phnx47 / dapper-repositories

CRUD for Dapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to query by page

sachem1 opened this issue · comments

///


/// Get all objects
///

IEnumerable FindAll();

    /// <summary>
    ///     Get all objects
    /// </summary>
    IEnumerable<TEntity> FindAll(IDbTransaction transaction);

Why not IQueryable?

It is not EnityFramework. After FindAll, query already returned results.

Documentation: https://dapper.phnx47.net/

Example:

var limit = 10u;
var offset = 5u;
var users = await userRepository.SetLimit(limit, offset).FindAllAsync();

Some tests: https://github.com/microorm-dotnet/MicroOrm.Dapper.Repositories/blob/0435a3c2e2085cd003b0764264f42c553f4b2fe3/test/MicroOrm.Dapper.Repositories.Tests/SqlGeneratorTests/MsSqlGeneratorTests.cs#L428-L445