I am trying to use grouping on an ObservableCollection of FacetedObject. FacetedObject is a custom class built on the fly, and this is the error I get.
No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with supplied type.
For Reference this is the definition of FacetedObject.
public class FacetedObject : ICustomTypeProvider, INotifyPropertyChanged, INotifyDataErrorInfo
{
public FacetedObject()
{
Id = Guid.NewGuid();
_facetValues = new Dictionary<string, object>();
_errorManager = new ValidationErrorManager(this, s => OnErrorsChanged(s));
_currentFacets = new List<Facet>();
_currentFacets.Add(Facet.DynamicDemo0);
_currentFacets.Add(Facet.DynamicDemo1);
}
List<Facet> _currentFacets;
private Guid _Id;
/// <summary>
/// A property we can use to show that normal & dynamic properties can be mixed
/// </summary>
public Guid Id
{
get { return _Id; }
set
{
_Id = value;
OnPropertyChanged("Id");
}
}
ValidationErrorManager _errorManager;
Dictionary<string, object> _facetValues;
public object this[string key]
{
get
{
if (!_facetValues.ContainsKey(key))
{
return null;
}
return _facetValues[key];
}
set
{
_facetValues[key] = value;
OnPropertyChanged(key);
}
}
No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with supplied type.
For Reference this is the definition of FacetedObject.
public class FacetedObject : ICustomTypeProvider, INotifyPropertyChanged, INotifyDataErrorInfo
{
public FacetedObject()
{
Id = Guid.NewGuid();
_facetValues = new Dictionary<string, object>();
_errorManager = new ValidationErrorManager(this, s => OnErrorsChanged(s));
_currentFacets = new List<Facet>();
_currentFacets.Add(Facet.DynamicDemo0);
_currentFacets.Add(Facet.DynamicDemo1);
}
List<Facet> _currentFacets;
private Guid _Id;
/// <summary>
/// A property we can use to show that normal & dynamic properties can be mixed
/// </summary>
public Guid Id
{
get { return _Id; }
set
{
_Id = value;
OnPropertyChanged("Id");
}
}
ValidationErrorManager _errorManager;
Dictionary<string, object> _facetValues;
public object this[string key]
{
get
{
if (!_facetValues.ContainsKey(key))
{
return null;
}
return _facetValues[key];
}
set
{
_facetValues[key] = value;
OnPropertyChanged(key);
}
}