Example #1
0
 public async Task <int> AddContact(ContactDto contact)
 {
     try
     {
         return(await _contactRepository.AddContact(ContactMapper.MapFromDto(contact)));
     }
     catch (ArgumentException)
     {
         throw;
     }
 }
Example #2
0
 public async Task UpdateContact(ContactDto contact)
 {
     try
     {
         await _contactRepository.UpdateContact(ContactMapper.MapFromDto(contact));
     }
     catch (ArgumentException)
     {
         throw;
     }
     catch (InvalidOperationException)
     {
         throw;
     }
 }