I am working on a c# project and writing a LINQ query, in this query I need to create a group, but I know I want to use that group type, but the type of the group gives me some trouble as I am not able to cast it to my desired type.
My Query is
from emp in employees
join dept in departments
on emp.EmpID equals dept.EmpID
group dept by dept.EmpID into groupSet
select new mycustomType
{
Department = groupSet
});