public void GetStudentsTest() { // Act _studentsService.GetStudents(); // Assert _mockIStudentRepository.Verify(rs => rs.GetStudents()); }
public async Task <ActionResult <IEnumerable <StudentEntity> > > Get() { using (var service = new StudentsService()) { await service.Initialize(); return(await service.GetStudents()); } }
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] public async Task <ActionResult <IEnumerable <Student> > > GetStudents() { return(await _studentsService.GetStudents()); }
public IActionResult GetAllStudents() => Ok(_studentsService.GetStudents());
public ActionResult <IEnumerable <Student> > Get() { var studentsService = new StudentsService(); return(studentsService.GetStudents()); }