Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
@{
foreach (var item in Model.Children.Where("Visible && eventDate >= DateTime.Now"))
{
@item.Name
}
i'm trying to run this code but i get
Have you tried Vissible == True && .. ? You might need to make that an explicit compare.
changed it and i still get an error, i've tried them alone and both working, but together i get an error.
Alright, I can't test it right now, but chaining Where statements should work:
.Where("Visible").Where(eventDate >= DateTime.Now")
this way it works thank you, but i'm curious why it won't work the way above
I think Gareth confirmed there was a problem with the implementation of "&&" and "||" in 4.7 which has been fixed for 4.7.1
Correct Alex, it's in this changeset: http://umbraco.codeplex.com/SourceControl/changeset/changes/d8da4dd6484d
awesome, i wish i could mark both answers as the solution, here's high five instead :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
newbie problem
@{
foreach (var item in Model.Children.Where("Visible && eventDate >= DateTime.Now"))
{
@item.Name
}
}
i'm trying to run this code but i get
Incorrect number of parameters supplied for lambda declaration
Have you tried Vissible == True && .. ? You might need to make that an explicit compare.
changed it and i still get an error, i've tried them alone and both working, but together i get an error.
Alright, I can't test it right now, but chaining Where statements should work:
this way it works thank you, but i'm curious why it won't work the way above
I think Gareth confirmed there was a problem with the implementation of "&&" and "||" in 4.7 which has been fixed for 4.7.1
Correct Alex, it's in this changeset: http://umbraco.codeplex.com/SourceControl/changeset/changes/d8da4dd6484d
awesome, i wish i could mark both answers as the solution, here's high five instead :)
is working on a reply...