public async Task <ActionResult <IEnumerable <Widget> > > GetWidgets() { var widgets = await _widgetRepository.GetAllAsync(); if (widgets == null) { return(NotFound()); } return(Ok(widgets.ToList())); }