I am trying to do join, group by and where condition using lambda expression in entity frame core but unable to return the query as IQuerayable. Below is the code -
Hide Copy Code
Code
await _entities.Company.Join(_entities.Employee,Code
com => com.Company_id,Code
emp => emp.Company_id,Code
(com, emp) => new SearchCompanyCode
{Code
companyID = com.Company_id,Code
industryType = com.industry_id,Code
company = com.Company_name,Code
location = com.City,Code
contacts = emp.Employee_phoneCode
})Code
.Where(input => input.company == companyName)Code
.GroupBy(c => new { c.companyID, c.industryType, c.company, c.location })Code
.ToListAsync();SearchCompany is a class with companyID,industryType,company,location,contacts as string properties and I need to return these values.
Please help me in getting it solved. Thanks in advance.

Vincent Maverick DuranoRank #238 · 10.3K reputationPosted Jul 11, 2018, 8:47 PM EDT
Hemant JindalRank #827 · 2.7K reputationPosted Jul 11, 2018, 10:25 PM EDT
srinath133 reputationPosted Jul 11, 2018, 11:03 PM EDT