I have a plain old CLR object which is essentially a wrapper for two entity framework objects, I\'m doing this so I can pass this wrapper object to a strongly typed view in
IF you add a parameterless constructor to your FooWrapper and then use object initialization instead, like so:
public IEnumerable ListFoosWithBars(int userID)
{
IEnumerable tempBar = ListBarsByUserID(userID);
IEnumerable results = (
from f in _entities.FooSet
join b in tempBar on f.ID equals b.foos.ID
select new FooWrapper()
{
FooObject = f,
BarObject = b
});
return results;
}