コード例 #1
0
        /// <summary>
        /// Adds a movie to the media library
        /// </summary>
        /// <param name="title">Title of the movie to add</param>
        private void AddMovieToStorage(string title)
        {
            var movie = new Movie
                            {
                                Title = title,
                                ReleaseDate = DateTime.Now
                            };

            this.Library.Add(movie);
        }
コード例 #2
0
        public ActionResult Create(Movie movie)
        {
            this._library.Add(movie);

            return Redirect("Movies");
        }
コード例 #3
0
        /// <summary>
        /// Setup the movie we want to store
        /// </summary>
        protected override void GivenThat()
        {
            base.GivenThat();

            this._movie = new Movie() { Title = "Blazing Saddles" };
        }