[object Object]

Could not find an implementation of the query pattern for source type ‘[type]’. ‘Where’ not found. Consider explicitly specifying the type of the range variable ‘[variableName]’

You get this error if you try to do a LINQ query on a collection that doesn’t have an explicit type:

public interface ISubSection
{
string Title { get; set; }
string Description { get; set; }
IList Items { get; set; }
}
var x = from c in FailingBuilds.Items

The simplest way to fix this (if you know the type at render time) is to cast the property to the concrete type in the LINQ statement: List<Build> below

var x = from c in (List&lt;Build&gt;)FailingBuilds.Items
where c.Committers.Count() &gt; 0
select c;

Jon

Share