Mark Tabor

Mark Tabor

  • 569
  • 1.9k
  • 430.1k

how to show one row from multiple rows with one column havin

Jan 4 2020 11:03 AM
Hi I have a Use case in which I have three tables as Teacher table , Courses Table, and TeacherVsCourse Table 
Course_ Id Name
 1 MathMatics
 2 Physics
 
The Teacher Table 
 Teacher_ID Teacher_Name
    1 AAA
 2 BBB
 
The TeacherVsCourses Table
 id Course_idTeacher_id 
 1 1 1
 2 2 1
 3 1 2
 
My Application is having MVC in asp.net architecture Now I am saving individual records into the database table as shown below 
 
you can check the image from here i have tried to add image but it gives error so i upload it here 
https://imgur.com/a/WQLeYjC
 
------
what i want onto my view instead of two rows for teacher-id =1 , I need    1 row with comma separated courses how to do it ? 
 

Answers (6)