How To Use Mapster mapper in Gridify #110
Answered
by
alirezanet
Mr-Mohammad
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hi @Mr-Mohammad, it is similar to AutoMapper example, e.g public static Paging<TDestination> GridifyTo<TSource, TDestination>(this IQueryable<TSource> query,
TypeAdapterConfig config, IGridifyQuery gridifyQuery, IGridifyMapper<TSource> mapper = null)
{
var res = query.GridifyQueryable(gridifyQuery, mapper);
// Map the query results to the destination type using Mapster
var mappedResults = res.Query.ProjectToType<TDestination>(config);
return new Paging<TDestination>(res.Count, mappedResults);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Recursive type result is How To use GridifyTo Without TypeAdapterConfig ?? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi @alirezanet
How can I Use Mapster mapper with a Gridify?
for example:
How To Map resalt to Paging
Beta Was this translation helpful? Give feedback.
All reactions