QueryableProjector icon indicating copy to clipboard operation
QueryableProjector copied to clipboard

λ IQueryable automatic projection device, easily convert IQueryable<Entity> to IQueryable<Dto>

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