8,497
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConsoleApplication4.Model;
using System.Diagnostics;
using System.Data.Objects.DataClasses;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
NorthwindEntities db = new NorthwindEntities();
db.Configuration.LazyLoadingEnabled = false;
IQueryable<Employee> employees = from e in db.Employees
select e;
foreach (Employee e in employees)
{
db.LoadProperty(e, e => e.Orders); //编译器提示找不到LoadProperty方法
}
Console.ReadKey();
}
}
}
using System.Data.Entity;