Arshad Ali

Arshad Ali

  • NA
  • 636
  • 33.1k

Convert below SQL query to LINQ

Sep 21 2021 7:09 AM

Hello Folks,

I want to convert the below SQL query to LINQ 

SELECT AVG(NF.Rating),U.userId, U.UserName,U.FirstName, U.LastName From Users U
LEFT JOIN UserRoles UR ON U.UserId = UR.UserId
LEFT JOIN ROLES R ON UR.RoleId = R.RoleId
LEFT JOIN NutritionistFeedbacks NF ON U.UserId = NF.NutritionistId
WHERE R.NormalizedName = 'NUTRITIONIST' 
GROUP BY U.userId, U.UserName,U.FirstName, U.LastName, NF.NutritionistId

Answers (1)