I have a Func like this :
Func<MyClass, bool> func = x=>Id == 5;
How I can convert it to :
Expression<Func<MyClass, bool>>
Try this:
Func<MyClass, bool> func = x=>Id == 5;
Expression<Func<MyClass, bool>> expr = mc => func(mc);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With