Beispiel #1
0
 public void DeleteChat(Guid id)
 {
     try
     {
         _chatsRepository.DeleteChat(id);
     }
     catch (SqlException exception)
     {
         var response = new HttpResponseMessage(HttpStatusCode.NotFound)
         {
             Content = new StringContent(exception.Message)
         };
         throw new HttpResponseException(response);
     }
 }
Beispiel #2
0
 public void Delete(Guid id)
 {
     _logger.Info($"{DateTime.Now.ToShortDateString()} Chat with {id} has been deleted");
     _chatsRepository.DeleteChat(id);
 }