public ActionResult CambiarPassword(string id) { if (string.IsNullOrEmpty(id)) { return(new HttpNotFoundResult()); } Guid secretId = Guid.NewGuid(); try { secretId = Guid.Parse(id); } catch (Exception) { return(new HttpNotFoundResult()); } CambioPassWordAdmRequest model = new CambioPassWordAdmRequest(); using (MesaDinero.Data.PersistenceModel.MesaDineroContext context = new Data.PersistenceModel.MesaDineroContext()) { MesaDinero.Data.PersistenceModel.Tb_MD_RecuperarPassword recuperar = null; recuperar = context.Tb_MD_RecuperarPassword.FirstOrDefault(x => x.SecredId == secretId); if (recuperar == null) { return(new HttpNotFoundResult()); } if (DateTime.Now > recuperar.FechaExpiracion) { return(new HttpNotFoundResult()); } model.email = recuperar.Email; model.sid = recuperar.SecredId.ToString(); } return(View(model)); }