private void AceptChangesExecute()
        {
            _repository.Update(Model);

            AceptCallBack?.Invoke();

            Messenger.Default.Send(new NotificationMessage("Updated"));
        }
Пример #2
0
        public ActionResult Edit([Bind(Include = "Id,CityId,Name,Members,Stadium,FundationDate,Logo")] FootballClub footballClub)
        {
            if (ModelState.IsValid)
            {
                _repository.Update(footballClub);

                return(RedirectToAction("Index"));
            }
            return(View(footballClub));
        }
        public void Update_OK()
        {
            /// changed values for tests

            FootballClub updateEntity = new FootballClub
            {
                Id            = 45,
                CityId        = 1,
                Name          = "New Team 3",
                Members       = 10,
                Stadium       = "New Stadium 3",
                FundationDate = DateTime.Today
            };

            int result   = instance.Update(updateEntity);
            int expected = 0;

            Assert.AreEqual(expected, result);
        }