public async Task <ActionResult <IEnumerable <JokeRecipient> > > Get() { if (AuthorizationUtils.Authorized(Request, _config) == false) { return(Unauthorized()); } var recipients = await _data.GetAll(); return(recipients.ToList()); }
// GET: Joke public async Task <ActionResult> Index() { var recipients = await _data.GetAll(); return(View(recipients.OrderBy(r => r.Name).ToList())); }