Пример #1
0
        public async Task AddDemoAsync(AddDemoDto dto)
        {
            var entity = new Demo(dto.Name);

            foreach (var item in dto.Items)
            {
                entity.AddItem(item.Name);
            }
            await _demoRepository.AddAsync(entity);
        }