コード例 #1
0
        public async Task <ActionResult <IEnumerable <Widget> > > GetWidgets()
        {
            var widgets = await _widgetRepository.GetAllAsync();

            if (widgets == null)
            {
                return(NotFound());
            }

            return(Ok(widgets.ToList()));
        }