[英]How to use Include() after OfType()?
放置這個:
using System.Data.Entity;
在您的使用列表中,之后您將能夠使用DbExtensions
類中的Include
擴展方法系列:
public static IQueryable<T> Include<T, TProperty>(this IQueryable<T> source, Expression<Func<T, TProperty>> path) where T : class;
public static IQueryable<T> Include<T>(this IQueryable<T> source, string path) where T : class;
public static IQueryable Include(this IQueryable source, string path);
他們接受IQueryable作為第一個參數,並且還有強類型的,哪個更好,然后是Include(String)
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.