예제 #1
0
 public static IQueryHandler <AllWidgetsQuery, IEnumerable <Widget> > Build(AllWidgetsQuery query)
 {
     return(new AllWidgetsQueryHandler());
 }
        public async Task <IEnumerable <Widget> > Handle(AllWidgetsQuery request, CancellationToken cancellationToken)
        {
            var widgets = MockWidgetDatabase.Widgets.OrderBy(x => x.Id);

            return(await Task.FromResult(widgets));
        }