QueryableProjector

IQueryable automatic projection device. Easily convert IQueryable<Entity> to IQueryable<Dto> var dtoQuery = query.ProjectTo<OrderDto>();


Keywords
Query, Linq, Queryable, Project, ProjectTo, Entity, Dto, entity-framework, mapping, projection
License
MIT
Install
Install-Package QueryableProjector -Version 1.1.1

Contributors

Umut Ozel


See all contributors


Documentation

QueryableProjector

IQueryable automatic prjection device, easily convert IQueryable<Entity> to IQueryable<Dto>.

Detects Includes and extends only included navigation properties.

Usage;

using (var context = new TestEntities()) {
    // Entity Query
    var query = context.Orders.Include(o => o.Customer).Include(o => o.OrderDetails.Select(od => od.Supplier));
    // Easily convert to Dto Query
    var dtoQuery = query.ProjectTo<OrderDto>();
    // profit?
}

Nuget