public void Delete(int id) { if (!_telefoneRepositorio.Excluir(id)) { var resp = new System.Net.Http.HttpResponseMessage(System.Net.HttpStatusCode.NotFound) { Content = new System.Net.Http.StringContent("Não há pessoas com esse telefone"), ReasonPhrase = " Not Found" }; } }
public void Excluir(Telefone telefone) { repositorio.Excluir(telefone); Commit(); }