コード例 #1
0
        public async Task <IActionResult> MakeSnapshot(string id, ulong version)
        {
            var stream = await _eventStoreRepository.GetStream(id);

            if (stream.HasValue)
            {
                var summary = EventGenerator.MakeSummary(stream.Value, version);
                await _eventStoreRepository.AddSnapshot(id, version, summary);
            }

            return(RedirectToAction("Details", new { id = id }));
        }