Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

EF7 rc1 lazy load

$
0
0

does EF7 rc1 support lazy load? i use Repository Pattern and Entity Framework7 rc1

To Include multiple entities, i add an "include" extension: but can notCompile Successfully,what should to do ?

public static class IncludeExtension
{
    public static IQueryable<TEntity> Include<TEntity>(this IDbSet<TEntity> dbSet,
                                            params Expression<Func<TEntity, object>>[] includes)
                                            where TEntity : class
    {
        IQueryable<TEntity> query = null;
        foreach (var include in includes)
        {
            query = dbSet.Include(include);
        }

        return query == null ? dbSet : query;
    }
}

Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>