-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using linq in razor template #115
Comments
Can you try pull #110 and see if it solves your problem? |
Fixed in v3.3.0 |
I am on version 3.4.0 and i am still having to do this. ((List)Model.AdsActivity).Take(10) Is this part of the fix above? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey,
upgraded from version 2 to 3.2
this used to work
@Model.SomeList.Sum(a => a.Amount)
now i get this exception:
Unable to compile template. Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
works if i do this:
@((MySpecificModelType)Model).SomeList.Sum(a => a.Amount)
why does this happen? anyway of using Sum without casting?
thanks!
The text was updated successfully, but these errors were encountered: