public ActionResult Edit(Account m) { AccountVM vm = new AccountVM(); vm.Update(m); ViewBag.Succesmessage = "Edycja pomyślna!"; return(RedirectToAction("Index")); }
public void TestUpdate() { AccountVM accountVM = new AccountVM(50, 0); accountVM.GetAccount(-100); accountVM.CurrentAccount.Shortname = "Иванов"; accountVM.Update(); accountVM.GetAccount(-100); Assert.AreEqual("Иванов", accountVM.CurrentAccount.Shortname); }