public static async Task <IEnumerable <Student> > OnGetStudentsAsync(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "students")] HttpRequest req
            , CancellationToken ct)
        {
            IStudentsRepository repository = new StudentsRepository();

            return(await repository.GetAllAsync(ct));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Get()
        {
            var response = await repository.GetAllAsync();

            return(Ok(response));
        }
Exemplo n.º 3
0
 public async Task OnGetAsync()
 {
     Course = await repository.GetAllAsync();
 }