public ActionResult Details(int id)
        {
            var ent = repositorio.Obtener(id);

            if (ent == null)
            {
                return(RedirectToAction(nameof(Index)));
            }
            return(View(ent));
        }
        public ActionResult PorInmueble(int id)
        {
            IList <Contrato> lista = repositorio.ObtenerPorInmueble(id);
            Inmueble         ent   = repositorioInmueble.Obtener(id);

            if (ent == null)
            {
                return(RedirectToAction(nameof(Index)));
            }
            ViewBag.PorInmueble = ent;
            return(View("Index", lista));
        }