public ActionResult Upload(int personId, PhotosController.UploadPOSTParameters param)
        {
            var validationResult = param.Validate();

            if (validationResult != null)
            {
                return(validationResult);
            }

            var photo = PhotosController.Upload(this, param);

            var personPhoto = new PersonPhoto();

            personPhoto.Person           = DatabaseSession.Load <Person>(personId);
            personPhoto.Photo            = photo;
            personPhoto.InsertedDateTime = DateTime.UtcNow;
            DatabaseSession.Save(personPhoto);

            return(Redirect(Url.GetUrl(ListPersonPhotos, personId, (int?)photo.PhotoId)));
        }
        public ActionResult Upload(int showId, PhotosController.UploadPOSTParameters param)
        {
            var validationResult = param.Validate();

            if (validationResult != null)
            {
                return(validationResult);
            }

            var photo = PhotosController.Upload(this, param);

            var showPhoto = new ShowPhoto();

            showPhoto.Show             = DatabaseSession.Load <Show>(showId);
            showPhoto.Photo            = photo;
            showPhoto.InsertedDateTime = DateTime.UtcNow;
            DatabaseSession.Save(showPhoto);

            return(Redirect(Url.GetUrl(ListShowPhotos, showId, (int?)photo.PhotoId)));
        }