I'm brand new to the world of asp.net web api. I have a solid understanding of get(), put(), post() and delete().
For my application, I need to implement two additional get() methods. Here is an overview-
public class StudentController : ApiController
{
public IEnumerable Get()
{
//returns all students.
}
//I want to include this method=======================
[HttpGet]
public IEnumerable GetClassSpecificStudents(string classId)
{
//retrieve all students from a specific class.
}
//Additionally, I would like to add this method=======================
[HttpGet]
public IEnumerable GetSectionSpecificStudents(string sectionId)
{
//fetch all students from a specific section.
}
public Student Get(string id)
{
//retrieves a specific student.
}
}
In the angularjs controller, there is already a $http.get(..)
configured.
My query is, how do I invoke the two extra get() methods from the angular controller.