Пример #1
0
        public async Task UpdateAsync(HostDetailsDto dto)
        {
            var host = await _hostRepository.GetAsync(dto.Id);

            if (host is null)
            {
                throw new HostNotFoundException(dto.Id);
            }

            host.Name        = dto.Name;
            host.Description = dto.Description;
            await _hostRepository.UpdateAsync(host);
        }