Esempio n. 1
0
        public async Task <GetWidgetsByCreationDateResponse> Handle(GetWidgetsByCreationDate query)
        {
            var widgets = await _context.Widgets
                          .Where(widget => widget.CreatedOn == query.CreationDate)
                          .ToListAsync();

            return(_widgetFactory.CreationDateResponse(widgets));
        }
        public async Task <GetWidgetsByCreationDateResponse> Handle(GetWidgetsByCreationDate query)
        {
            var widgets = await _widgetRepository.SearchCreationDate(query.CreationDate);

            return(_widgetFactory.CreationDateResponse(widgets));
        }