You don't have to cast e.Results
to ObjectView
, because that already is the return type. (Besides, System.Data.Objects.ObjectView
is an internal class). But the point is that it implements IEnumrable
(as part of IBindingList
), not IEnuerable<T>
.
The common way to convert a non-generic IEnumerable to a generic one is the Cast<T>
method:
var list = e.Results.Cast<Retailer>();