Hi,
this is shanker MY requirement is linq distinct query my code this
public static List<sch_view_parent_student_search_lookup> sch_view_parent_student_search_lookup(int? faciltyid)
{
ComponentsDataContext db = DBManager.DataContext;
var sch_view_class_student_list = (from even in db.sch_view_parent_student_search_lookup
where even.facility_id==faciltyid
select even. parent_person_id ).Distinct();
return sch_view_class_student_list.ToList();
}
Here i have one column parent_person_id that column must be in distinct how to write that .
i face one error this is
1 Cannot implicitly convert type 'System.Collections.Generic.List<int?>' to 'System.Collections.Generic.List<TelerikComponentsBL.sch_view_fee_student_schedule_fee_list>' D:\sama\asp\TelerikComponentsBL\feetranscationmanager.cs 25 20 TelerikComponentsBL
how to solve this problem.and how to write Distinct of above query .
thanks and regards
shanker.B