public void PagarBono(int bonoId) { //get bono var bono = bonoRepo.Get(bonoId); if (bono == null) { throw new KeyNotFoundException(); } SetBonoPagado(bono); bonoRepo.Update(bono); CrearHistorialBonoPagado(bono.Id); bonoRepo.Save(); }