コード例 #1
0
        public LinkedList <IAggregateEvent> GetEvents(string aggregateName)
        {
            var aggregateId = int.Parse(aggregateName);
            var list        = _genericEntityService.Get <Event>(q => q.Where(x => x.AggregateId == aggregateId).ToList());

            return(new LinkedList <IAggregateEvent>(_eventToAggregateEventMapper.Map(list)));
        }
コード例 #2
0
        public LinkedList<IAggregateEvent> GetEvents(string aggregateName)
        {
            using (var connection = new SqlConnection(_connectionString))
            {
                var aggregateId = int.Parse(aggregateName);

                return _eventToAggregateEventMapper.Map(connection.Query<Event>(SELECT_ALL_EVENTS, new { AggregateId = aggregateId }).ToList());
            }
        }
コード例 #3
0
        public LinkedList <IAggregateEvent> GetEvents(string aggregateName)
        {
            var aggregateId = int.Parse(aggregateName);

            var events = allEvents.Select(x => x.Clone())
                         .Cast <Event>()
                         .Where(x => x.AggregateId == aggregateId)
                         .ToList();

            return(_eventToAggregateEventMapper.Map(events));
        }