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); } }
public void Delete(Guid id) { _logger.Info($"{DateTime.Now.ToShortDateString()} Chat with {id} has been deleted"); _chatsRepository.DeleteChat(id); }