Exemple #1
0
        public ActionResult EditPhoto(Photos photo)
        {
            string json;

            ModelState.Clear();

            if (TryValidateModel(photo))
            {
                _photoRepository.Change(photo);
                return(RedirectToAction("AllPhotos", "AdminPhoto"));
            }
            else
            {
                return(RedirectToAction("Error", "AdminPhoto"));
            }
        }