MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.31k stars 328 forks source link

Added IOrderedQueryable Interface on MapsterQueryable #431

Closed noelmugnier closed 2 years ago

noelmugnier commented 2 years ago

I'm currently using Mapster as mapping tool for OData in order to optimize my sql queries with entity framework and avoid exposing the DAL :)

But when I'm using new Mapper().From(IQueryable query).ProjectTo().OrderBy(e => e.Id); I can't OrderBy the result of the projection, it says can't cast MapsterQueryable to IOrderedQueryable.

So I've added the interface and one unit test to ensure it's possible now. Regards.

andrerav commented 2 years ago

Thank you @noelmugnier!

andrerav commented 2 years ago

This is now available in the latest pre-release package.