Пример #1
0
 public ActionResult DeleteBanco(BancoDto dto)
 {
     try
     {
         _query = new DQuery(_unitOfWork);
         _query.Eliminar(dto);
         _unitOfWork = _query.GetUnitOfWork();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(RedirectToAction("Index"));
 }
Пример #2
0
        public void TestEliminarBancoAreEqual()
        {
            var compare = true;
            var dto     = new BancoDto();

            dto.Id = 1;
            _query.Eliminar(dto);
            var lista = _query.Listar(new BancoDto());

            foreach (var item in lista)
            {
                if (item.Id == dto.Id)
                {
                    compare = false;
                    break;
                }
            }
            Assert.AreEqual(compare, true);
        }