public IQueryable<SendFormGridVM> GetForms(int company, string lang, string targetEmp, string targetDept, string targetJob) { var query = from s in context.SendForms where s.CompanyId == company select new SendFormGridVM { Id = s.Id, CreatedUser = s.CreatedUser, Departments = HrContext.CommaSeperatedNames("CompanyStructures", s.Departments, lang), DeptLabel = targetDept, Employees = HrContext.CommaSeperatedNames("People", s.Employees, lang), EmpLabel = targetEmp, FormId = s.FormId, ExpiryDate = s.ExpiryDate, Jobs = HrContext.CommaSeperatedNames("Jobs", s.Jobs, lang), JobLabel = targetJob, SentDateTime = s.CreatedTime }; return query; }