예제 #1
0
        public IActionResult GetStudents([FromServices] IStudentsDal serv, [FromQuery] string orderBy)


        {
            if (orderBy == "lastname")
            {
                return(Ok(_dbService.GetStudents().OrderBy(stu => stu.LastName)));
            }
            return(Ok(_dbService.GetStudents()));
        }
예제 #2
0
 public IActionResult GetStudents()
 {
     return(Ok(_dbService.GetStudents()));
 }
예제 #3
0
 public IActionResult GetStudents(string orderBy)
 {
     return(Ok(studentDB.GetStudents()));
 }
예제 #4
0
 public IActionResult GetStudents(string orderBy)
 {
     //return Ok(_dbService.GetStudents());
     return(Ok(_dbService.GetStudents()));
 }