Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMapper: bind using expression

Current code throw exception Expression is not a MemberExpression:

TinyMapper.Bind<StudenRecord, StudentEntity>(cfg =>
{                
    cfg.Bind(x => $"{AppSettings.AvatarBaseUrl}/{x.AvatarUrl}", t => t.AvatarUrl);
});

Is there a way i could achieve my goal using TinyMapper?

like image 507
Maxim Zhukov Avatar asked Dec 31 '25 15:12

Maxim Zhukov


1 Answers

Currently, TinyMapper doesn't support a MethodCallExpression it supports only MemberExpression, as a workaround, you can create custom type converter

like image 181
GSerjo Avatar answered Jan 06 '26 04:01

GSerjo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!