It is very simple, are you using Entity Framework or Storage Procedure or simple select ?
either way you can filter on database
on your select just put something like that
select distinct(EmpName),Emp_ID, EmpParent_ID from TABLENAME group by EmpName
or you can use LINQ
example
class Program
{
static void Main(string[] args)
{
List<person> pessoas = new List<person>()
{
new Person(){ id = 1, name = "fernando"},
new Person(){ id = 2, name = "rodrigo"},
new Person(){ id = 4, name = "fernando"},
new Person(){ id = 5, name = "rogerio"},
new Person(){ id = 6, name = "fernando"},
new Person(){ id = 7, name = "davi"}
};
foreach (Person pes in pessoas.Distinct(new CustomComparer()))
{
Console.WriteLine(pes.name);
}
Console.Read();
}
}
public class Person
{
public int id { get; set; }
public string name { get; set; }
}
public class CustomComparer : IEqualityComparer<person>
{
public bool Equals(Person x, Person y)
{
return x.name.Equals(y.name);
}
public int GetHashCode(Person obj)
{
return this.GetHashCode();
}
}</person></person></person>