Jul 9, 2024
ValuesController
.GetStudents
action method to return IEnumerable<Student>
.Models
.Models
folder, added a new class named Student
.
Student
class:
StudentID
StudentName
EmailAddress
StudentAddress
Student
with example data:
StudentID = 1, StudentName = "Student 1", Email = "email1@gmail.com", Address = "Hyderabad, India"
StudentID = 2, StudentName = "Student 2", Email = "email2@gmail.com", Address = "Bangalore, India"
GetStudents
action method returns a list of students.email1@gmail.com
, Hyderabad, India
email2@gmail.com
, Bangalore, India