How to filter the duplicate records from datatable using linq?

Posted by Prabu_Spark under LINQ on 8/25/2014 | Points: 10 | Views : 1598 | Status : [Member] | Replies : 2
Hi
I need linq query to delete the duplicate records from the datatable that contains specific words in that datacolumn. Kindly give me the solution for this problem.


In Datatable, i have the following rows

studentid studentname coursename
1 Abhi Course - I
1 Abhi Course - II



[Hint : I need to filter the duplicate records based on Coursename contains the word Course]


Expected Output:

studentid studentname coursename
1 Abhi Course - I

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Bandi on: 8/26/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://stackoverflow.com/questions/24012469/how-to-remove-duplicate-record-using-linq
http://www.maskaravivek.com/blog/c/how-to-delete-duplicates-records-from-a-table-using-linq-in-c/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 8/26/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
http://stackoverflow.com/questions/1606679/remove-duplicates-in-the-list-using-linq
http://www.experts-exchange.com/Programming/Languages/.NET/Q_27454185.html

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response