Esempio n. 1
0
        private TAggregateRoot Load(Guid id)
        {
            var events = _aggregateRootStorage.GetEventsForRoot <TAggregateRoot>(id);

            if (events == null)
            {
                events = Enumerable.Empty <dynamic>();
            }
            var user = CreateInstance(id, events);

            _users.Add(id, user);
            return(user);
        }