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