public ActionResult DeleteBanco(BancoDto dto) { try { _query = new DQuery(_unitOfWork); _query.Eliminar(dto); _unitOfWork = _query.GetUnitOfWork(); } catch (Exception ex) { throw ex; } return(RedirectToAction("Index")); }
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); }