public void Borrar(int id) { try { _SalaRepository.Delete(id); _SalaRepository.Save(); } catch (Exception ex) { Log.Error(ex.ToString()); } }
public void Delete_Deveria_Deletar_Uma_Sala() { //Arrange Sala resultSala = _salaRepository.Save(_salaDefault); //Action _salaRepository.Delete(resultSala); //Assert Sala resultGet = _salaRepository.Get(resultSala.Id); List <Sala> resultGetAll = _salaRepository.GetAll(); resultGet.Should().BeNull(); resultGetAll.Should().HaveCount(2); }
public async Task <bool> Deletar(long id) { return(await repository.Delete(id)); }