0
我尝试下面的一段代码,并收到错误“无法等待”MongoDB.Driver.IFindFluent' “。谁能告诉我为什么?我错过了什么? 谢谢,无法等待同步任务
public async Task<ActionResult> Index()
{
var blogContext = new BlogContext();
var recentPosts = await blogContext.Posts.Find(new BsonDocument());
var model = new IndexModel
{
RecentPosts = recentPosts
};
return View(model);
}
有一个'FindAsync'方法吗?你不能等待同步的东西。 – 2015-04-05 23:18:07