public ValuesRootAggregate GetById(Guid id, long version) { var temp = version; if (temp <= 0) { temp = int.MaxValue; } var aggregate = _context.GetById(id, temp); if (aggregate == null || !aggregate.Events.Any()) { return(null); } return(CreateAggregate(aggregate)); }