public IActionResult Update(int id) { var mail = _mailAccountRepository.GetwithId(id); UpdateMailAccountModel guncellenecekVeri = new UpdateMailAccountModel { Id = mail.Id, Name = mail.Name, Password = mail.Password }; return(View(guncellenecekVeri)); }
public IActionResult Update(UpdateMailAccountModel model) { if (ModelState.IsValid) { var mail = _mailAccountRepository.GetwithId(model.Id); mail.Id = model.Id; mail.Name = model.Name; mail.Password = model.Password; _mailAccountRepository.Update(mail); return(RedirectToAction("index")); } return(View(model)); }