public async Task AddAsync(Round Round)
 {
     try
     {
         await m_repository.CreateAsync(Round);
     }
     catch (ValidationException e)
     {
         m_logger.LogWarning(e, "A validation failed");
         throw;
     }
     catch (Exception e) when(e.GetType() != typeof(ValidationException))
     {
         m_logger.LogCritical(e, $"Unexpected Exception while trying to create a Round with the properties : {JsonConvert.SerializeObject(Round, Formatting.Indented)}");
         throw;
     }
 }
Esempio n. 2
0
 public async Task Create(CreateRoundRequest requset)
 {
     Round round = _mapper.Map <Round>(requset);
     await _roundRepository.CreateAsync(round);
 }