public async Task UpdateAsync(string id, UpdateDowntimeRequest request)
        {
            var entity = await _readRepository.GetByIdAsync(id);

            var costs = request.Costs
                        .Select(p => new DowntimeCostEntity
            {
                ActivityCostKind = p.ActivityCostKind,
                Value            = p.Value,
                Goal             = p.Goal
            })
                        .ToArray();

            var updatedEntity = new DowntimeEntity
            {
                Character = entity.Character,
                Activity  = entity.Activity,
                Costs     = costs
            };

            await(await _container).ReplaceItemAsync(
                await _entityMutator.UpdateMetadataAsync(updatedEntity, entity, request.SharedWith),
                id
                );
        }
 public async Task <DowntimeEntity> GetByIdAsync(string id) =>
 await _readRepository.GetByIdAsync(id);