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);
        }
示例#2
0
 public async Task PostAsync(AddDemoDto addDemoDto)
 {
     await _demoService.AddDemoAsync(addDemoDto);
 }