public ActionResult Create(Propietario propietario)
 {
     try
     {
         if (ModelState.IsValid)
         {
             propietario.Clave = Convert.ToBase64String(KeyDerivation.Pbkdf2(
                                                            password: propietario.Clave,
                                                            salt: System.Text.Encoding.ASCII.GetBytes(configuration["Salt"]),
                                                            prf: KeyDerivationPrf.HMACSHA1,
                                                            iterationCount: 1000,
                                                            numBytesRequested: 256 / 8));
             repositorio.Agregar(propietario);
             //  TempData["Id"] = propietario.Id;
             return(RedirectToAction(nameof(Index)));
         }
         else
         {
             return(View(propietario));
         }
     }
     catch (Exception ex)
     {
         ViewBag.Error      = ex.Message;
         ViewBag.StackTrace = ex.StackTrace;
         return(View(propietario));
     }
 }