我正在尝试查询我的收藏品,但我不确定如何对其进行"追加" Query.And()
这是我创建Item
文档的域模型:
public class Item
{
public ObjectId Id { get; set; }
public string ItemTypeTemplate { get; set; }
public string UsernameOwner { get; set; }
public IList<ItemAttribute> Attributes { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
将IList<ItemAttribute>
根据收集的变化ItemTypeTemplate
(某种查找关键项目的属性预先确定的名单)
以下是Item
文档示例:
{
"_id" : ObjectId("5130f9a677e23b11503fee72"),
"ItemTypeTemplate" : "Tablet Screens",
//can be other types like "Batteries", etc.
//which would change the attributes list and values
"UsernameOwner" : "user032186511",
"Attributes" : [{
"AttributeName" : "Screen Size",
"AttributeValue" …
Run Code Online (Sandbox Code Playgroud)