【发布时间】:2023-03-03 03:10:02
【问题描述】:
我想根据列表中存在的项目检查列表中的某些项目是否相同。
List<ProductDetailDTO> productDTOs;
ProductDetailDTO 是 -
public class ProductDetailDTO
{
public int ProductId { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public byte[] Image { get; set; }
public string Description { get; set; }
public string Brand { get; set; }
public string GUID { get; set; }
public string VariantName { get; set; }
public string VariantValue { get; set; }
public decimal Price { get; set; }
}
现在,我想同时显示所有具有相同 GUID 的 VariantName 和 VariantValue。
我怎样才能做到这一点?
【问题讨论】:
-
你也在这里发布过同样的问题吗? stackoverflow.com/questions/52252391/…
标签: c# list entity-framework linq