I have foreach loop in Razor that iterates over group by-ed elements so every element must have a Key property but it throws me Exception :
'object' does not contain a definition for 'Key'

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
try changing your loop to
substituting in the actual types of your grouping key and value.