Esempio n. 1
0
 public async Task AddAsync(HostDto dto)
 {
     dto.Id = Guid.NewGuid();
     await _hostRepository.AddAsync(new Host()
     {
         Id          = dto.Id,
         Name        = dto.Name,
         Description = dto.Description
     });
 }
Esempio n. 2
0
 public async Task AddAsync(HostDetailsDto dto)
 {
     dto.Id = Guid.NewGuid();
     var host = new Host
     {
         Id          = dto.Id,
         Name        = dto.Name,
         Description = dto.Description
     };
     await _hostRepository.AddAsync(host);
 }