Example #1
0
        private (GetHeroResult, GetHeroResultInfo) BuildData(JsonElement obj)
        {
            using IEntityUpdateSession session = _entityStore.BeginUpdate();
            var entityIds = new HashSet <EntityId>();

            // store updates ...
            EntityId heroId = UpdateHeroEntity(obj.GetProperty("hero"), entityIds);

            // build result
            var resultInfo = new GetHeroResultInfo(
                heroId,
                DeserializeNonNullString(obj, "version"),
                entityIds,
                session.Version);

            return(_resultDataFactory.Create(resultInfo), resultInfo);
        }