public ActionResult Create(Alquiler alquiler)
 {
     try
     {
         repoInmueble.CambioDisponible(alquiler.IdInmueble, "NO");
         if (ModelState.IsValid)
         {
             repositorio.Alta(alquiler);
             TempData["Alta"] = "Contrato de alquiler agregado correctamente";
             return(RedirectToAction(nameof(Index)));
         }
         else
         {
             repoInmueble.CambioDisponible(alquiler.IdInmueble, "SI");
             ViewBag.inmueble  = repoInmueble.ObtenerTodos();
             ViewBag.inquilino = repoInquilino.ObtenerTodos();
             return(View());
         }
     }
     catch (Exception ex)
     {
         ViewBag.inmueble   = repoInmueble.ObtenerTodos();
         ViewBag.inquilino  = repoInquilino.ObtenerTodos();
         ViewBag.Error      = ex.Message;
         ViewBag.StackTrate = ex.StackTrace;
         return(View());
     }
 }