Sadegh
Sadegh

Reputation: 4341

return non-duplication of records in result with linq

How i can return non-duplication of records in result with linq?

var design = firoozehDataContext.Designs;
comboBoxCode.DataSource = design.ToList();

above code return all records, but i want to do that i said on above.

thanks

Upvotes: 0

Views: 22

Answers (1)

Li0liQ
Li0liQ

Reputation: 11264

You should use Distinct().

Like var design = firoozehDataContext.Designs.Distinct();

Upvotes: 1

Related Questions