I have a class Items with properties (Id, Name, Code, Price).
Items
properties (Id, Name, Code, Price)
The List of Items is populated with duplicated items.
F
var distinctItems = items.GroupBy(x => x.Id).Select(y => y.First());