波纹管代码正在使用聚合和查找
public class ProductItemModel
{
public string Id { get; set; }
public Product[] Items { get; set; }
}
var _orderCollection = _context.GetCollection<Order>("Orders");
var _productCollection = _context.GetCollection<Product>("Products");
var data = (_orderCollection.Aggregate()
//.Match(p => p.Id == "10000")
.Lookup<Order, Product, ProductItemModel>(
_productCollection,
x => x.Items,
x => x.Id,
x => x.Items)
).ToList();
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句