henkmollema / Dommel

CRUD operations with Dapper made simple.
MIT License
611 stars 99 forks source link

SelectPaged and Multi Mapping #283

Open jobvitral opened 2 years ago

jobvitral commented 2 years ago

Is there a way to use multi mapping with SelectPaged?

For Example:

var paged = await _context.Connection.SelectPagedAsync<User, Role, User>(expression, 1, 50, (user, role) =>
{
    user.Password = null;
    user.Role = new Role
    {
        Id = role.Id,
        Name = role.Name
    };
    return user;
});
henkmollema commented 1 year ago

Currently there is not, but there could be. I'm open for PR's.