I am in the process of updating Umbraco version. There is a blog, but the macro outputting blog posts is hiccuping. Originally, it was something like:
dynamic result = Model.Descendants().Where("NodeTypeAlias == \"BlogPost\"");
var values = new Dictionary<string,object>();
values.Add("currentDate", DateTime.Now) ;
result = result.Where("blogDate <= currentDate", values);
In v7.3, the debug error says
Error loading partial view macro (View: ~/Views/MacroPartials/Blog Post List.cshtml) 'object' does not contain a definition for 'Where'
I tried changing the Where cause to a different Lambda expression
Where(x => x.GetPropertyValue<DateTime>("blogDate") < values)
but then the error changes to
error CS1977: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
Any advice would be greatly appreciated. Thanks in advance!