Beispiel #1
0
        public async Task UpdateAsync(string email, string password)
        {
            var emailAccount = await _emailAccountRepository.GetByEmailAsync(email);

            emailAccount.Update(email);
            emailAccount.UpdatePassword(password);

            await _emailAccountRepository.UpdateAsync(emailAccount);
        }
Beispiel #2
0
        public async Task <ActionResult> Edit([Bind(Include = "EmailAccountID,Email,DisplayName,Host,Port,Username,Password,EnableSsl,UseDefaultCredentials,IsDefault")] EmailAccount emailAccount)
        {
            if (ModelState.IsValid)
            {
                await emailAccountRepository.UpdateAsync(emailAccount);

                return(RedirectToAction("Index"));
            }

            return(View(emailAccount));
        }