Hi I am having a mvc web application in which I have four tables and i am using below linq query to get all columns from all tables and i inspect it using debugging it is getting all data from all four tables ,
- var dept = from s in db.Teacher_courses
- join ce in db.Courses on s.CourseId equals ce.Course_Id
- join se in db.Semesters on s.Semester_Id equals se.Semester_Id
- join re in db.Registration on s.Teacher_Id equals re.User_Id
- where ce.Course_Id == s.CourseId
- select s;
I have below Model class previously i was only getting data from Teacher_Courses Table but now I need to add more columns like semester,Registration and Courses table , so for experiment I just wrote the above query and inpect it using debugging it is getting all fields values from all tables , so I add one more property to my model class for Courses_TAGS as shown below
and i am using it in my view as shown below
- @Html.DisplayFor(modelItem => item.regs.FullName)
@Html.DisplayFor(modelItem => item.Course_Tags)
but i am getting this below error message

Rupesh KahaneRank #136 · 16.4K reputationPosted Jan 17, 2020, 9:51 AM EST
Piyush PansuriyaRank #454 · 5.5K reputationPosted Jan 17, 2020, 9:59 AM EST
Mark TaborRank #914 · 2.3K reputationPosted Jan 17, 2020, 10:29 AM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 18, 2020, 8:36 AM EST
Suraj KumarRank #353 · 7.1K reputationPosted Jan 18, 2020, 11:26 AM EST