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));
        }
        public async Task <ActionResult> Get()
        {
            var response = await repository.GetAllAsync();

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