示例#1
0
 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);
        }
示例#3
0
 public async Task <bool> Deletar(long id)
 {
     return(await repository.Delete(id));
 }