select distinct values from dataset in c# code example
Example 1: c# get distinct values all fields from list
if (!IsPostBack) {
GridView1.DataSource = GetProducts()
.GroupBy(o => new { o.Make, o.Model })
.Select(o => o.FirstOrDefault());
GridView1.DataBind();
}
Example 2: select distinct two columns entity framework c#
var data = TESTDB.Where(i => i.ALPHA == 1).Select(i => new {i.A, i.B, i.C}).Distinct();