예제 #1
0
        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());
 }