public async Task <IActionResult> Get() { var widgets = await _widgetRepository.List(); var resources = widgets.Select(WidgetMap.ToResource); return(Ok(ResponseDocument.Containing(resources))); }
public IEnumerable <Widget> Get() { return(_widgetRepository.List()); }