public void RemoveById(int clientId) { if (!clientTableRepository.ContainsById(clientId)) { throw new ArgumentException($"Client with Id {clientId} doesn't exist"); } ClientEntity client = clientTableRepository.GetById(clientId); clientTableRepository.Remove(client); clientTableRepository.SaveChanges(); }
public string RemoveClient(int clientId) { string result = clientTableRepository.Remove(clientId); return(result); }