I'm not quite sure where the value Criteria.Periodappears in your sample request.
, ( ). , (Termination) (, ). select "" , ( Hires), .
Concat (. MSDN). ( ), :
var terms = from t in HRSystemDB.Terminations
select new { Month = t.TerminationDate.Month,
Year = term1.TerminationDate.Year,
IsHire = false };
var hires = from emp in HRSystemDB.Persons.OfType<Employee>()
select new { Month = emp.HireDate.Month,
Year = emp.HireDate.Year
IsHire = true };
var summary = terms.Concat(hires);
var res = from s in summary
group s by new { s.Year, s.Month } into g
select new { Period = g.Key,
Hires = g.Count(info => info.IsHire),
Terminations = g.Count(info => !info.IsHire) }
, , . , , . , , . evalutation LINQ to SQL .