Mapping Expression<Func<Type1,bool>> Expression<Func<Type2, bool>>

旧巷老猫 提交于 2019-12-06 11:52:24
luksan

I just updated my answer to the another question you commented on, which I think addresses this: AutoMapper for Func's between selector types

As for the error you posted above, that appears to be because you tried to map one Expression type to another with AutoMapper, e.g. Mapper.Map<Expression<Func<Type1,bool>>, Expression<Func<Type2, bool>>>(exp1, exp2). That sort of thing is not supported; AutoMapper is only for mapping between instances of different types, not expressions that deal with those types.

Anyway, if you read my other answer it may tell you how to achieve what you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!