I should have deleted my question since the answer is too simple, but for the record, let's just keep it up.
namespace System.Linq
{
public static class EntityFrameworkExtensions
{
public static IEnumerable<object> AsEnumerable(this DbSet set)
{
foreach (var entity in set)
yield return entity;
}
}
}
Usage:
var collection = context.Set(entityType).AsEnumerable();
Beware that any filtering performed on the retuned collection will not happen on the SQL server, but on the collection enumerator, the entire table will be returned. Use only when loading all rows anyway.