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)); }
public async Task OnGetAsync() { Course = await repository.GetAllAsync(); }