我正在构建一个C# EntitySetController,使用它来查询MongoDB数据库的最有效方法是什么?对IQueryable集合或MongoCursor集合使用Odata查询是可行的吗?
发布于 2014-10-11 16:56:38
我建议你使用IQueryable集合,它也被MongoDB支持。例如:
public IQueryable<EntityType> Get()
{
return database.GetCollection<EntityType>("EntitySetName").AsQueryable();
}其中database是MongoDB C# driver的MongoDB.Driver.MongoDatabase的实例。
https://stackoverflow.com/questions/26302692
复制相似问题