我需要根据参数列表查询集合。例如我的模型是:
public class Product
{
string id{get;set;}
string title{get;set;}
List<string> tags{get;set;}
DateTime createDate{get;set;}
DbReference<User> owner{get;set;}
}
public class User
{
string id{get;set;}
...other properties...
}
我需要查询指定用户拥有并按creationDate 排序的所有产品。
例如:
GetProducts(List<string> ownerIDs)
{
//query
}
如果可能,我需要在一个查询中完成,而不是在 foreach 中。如果需要,我可以更改我的模型