Skip to content

Added IOrderedQueryable Interface on MapsterQueryable #431

Merged
andrerav merged 1 commit intoMapsterMapper:masterfrom
noelmugnier:master
Jun 27, 2022
Merged

Added IOrderedQueryable Interface on MapsterQueryable #431
andrerav merged 1 commit intoMapsterMapper:masterfrom
noelmugnier:master

Conversation

@noelmugnier
Copy link
Contributor

@noelmugnier noelmugnier commented Apr 28, 2022

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.

…rderBy Projection<> Result using MapperInstance.From()
@andrerav andrerav merged commit 86b84cf into MapsterMapper:master Jun 27, 2022
@andrerav
Copy link
Member

Thank you @noelmugnier!

@andrerav
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants