public async Task <List <EventSalaryCompactView> > Get(DateTime?begin, DateTime?end) { var targetIds = await eventsService.GetEventIdsInRange(begin, end); var mapExpression = mapper.ConfigurationProvider.ExpressionBuilder.GetMapExpression <EventSalary, EventSalaryCompactView>(); return(await eventSalaryContext.GetAll( es => targetIds.Contains(es.EventId), mapExpression)); }
public Task <List <Guid> > GetEventIdsInRange(DateTime?begin, DateTime?end) { return(eventSalaryContext.GetAll(es => true, es => es.EventId)); }