select COUNT(*) AS DD ,FCourseName from TCourse GROUP BY FCourseName HAVING COUNT(*) > 1
I can't test here the query, so i'm unable to provide the exact expression for your query.i'm giving you some ref you can solve it yourself.<br /> and,it'll be better for you.
<pre lang="c#">var result = context.TCourses.GroupBy(x => x.FCourseName). Where(x => x.Count() > 1). Select(x => new {name = x.Key, count = x.Count()}). OrderByDescending(x => x.count);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)