0
http://msdn.microsoft.com/en-us/library/bb896376.aspx在這裏說,大約一個load方法無法做到this.Context.Users.Load()
this.context = new MyEntities();
this.Context.Users.
,但我不能做this.Context.Users.Load()
我無法找到方法加載 我該怎麼辦?
http://msdn.microsoft.com/en-us/library/bb896376.aspx在這裏說,大約一個load方法無法做到this.Context.Users.Load()
this.context = new MyEntities();
this.Context.Users.
,但我不能做this.Context.Users.Load()
我無法找到方法加載 我該怎麼辦?
如果它不爲您提供Load
方法,這意味着Users
不EntityCollection<User>
。它可以是ObjectQuery<User>
,ObjectSet<User>
或DbSet<User>
。而不是Load
使用:
var data = this.context.Users.ToList();
它也回答問題你應該怎麼做?在開始在文檔中搜索之前,應該學會使用IDE來識別正確的類型。