public ActionResult Management(EmailModel emailModel) { if (ModelState.IsValid) { //Secure data emailModel.Password = SecureData.EncryptText(emailModel.Password, WebConfigurations.KeySecure); emailModel.From = SecureData.EncryptText(emailModel.From, WebConfigurations.KeySecure); emailModel.To = SecureData.EncryptText(emailModel.To, WebConfigurations.KeySecure); var email = emailModel.CastTo <Models.Email>(); var result = _email.Update(email, CurrentUserLogin); } return(View(emailModel)); }