Exemplo n.º 1
0
 public async Task <List <CampaignViewModel> > Handle(UnlockedCampaignsQuery message)
 {
     return(await _context.Campaigns
            .Include(x => x.ManagingOrganization)
            .Include(x => x.Events)
            .Include(x => x.ParticipatingOrganizations)
            .Where(c => !c.Locked && c.Published)
            .Select(campaign => campaign.ToViewModel()).ToListAsync());
 }
Exemplo n.º 2
0
 public List <CampaignViewModel> Handle(UnlockedCampaignsQuery message)
 {
     return(_context.Campaigns
            .Include(x => x.ManagingOrganization)
            .Include(x => x.Events)
            .Include(x => x.ParticipatingOrganizations)
            .Where(c => !c.Locked && c.Published)
            .ToViewModel()
            .ToList());
 }
Exemplo n.º 3
0
 public List <CampaignViewModel> Handle(UnlockedCampaignsQuery message)
 {
     return(_dataAccess.Campaigns.Where(c => !c.Locked).ToViewModel().ToList());
 }