public virtual IEnumerable <EpcisEvent> Perform(XElement parameters) { var id = parameters.Elements().ToList(); if (id == null || !id.Any()) { throw new QueryParameterException("Id parameters are expected at this point."); } return(_eventsRetriever.GetByIds(id.Select(x => long.Parse(x.Value)).ToArray())); }
public virtual IEnumerable <EpcisEvent> Perform(EpcisQuery query) { var eventIds = _eventsRetriever.RetrieveIds(SqlQuery, new { Epc = query.Parameters.Single(x => x.Name == "epc").Values.Single() }); return(_eventsRetriever.GetByIds(eventIds.ToArray())); }
public virtual IEnumerable <EpcisEvent> Perform(EpcisQuery query) { var ids = query.Parameters.Where(x => x.Name == "id").SelectMany(x => x.Values).Select(long.Parse).ToArray(); return(_eventsRetriever.GetByIds(ids)); }