public ActionResult addmovietype(TypeOfMovie x) { if (ModelState.IsValid) { // save in database db.TYPESS.Add(x); db.SaveChanges(); return(RedirectToAction("showallmovies", "Admin")); } else { return(View()); } }
private static Movie BuildMovie(TypeOfMovie priceCode, string title) { return(new Movie { PriceCode = priceCode, Title = title }); }
private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented) { return(new Rental { Movie = BuildMovie(priceCode, title), DaysRented = daysRented }); }
public static void GetRentalInformation(string title, TypeOfMovie priceCodesOfMovie, int daysRented) { Titles = new[] { title }; PriceCodesOfMovies = new[] { priceCodesOfMovie }; DaysRented = new[] { daysRented }; }
private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented) { return new Rental {Movie = BuildMovie(priceCode, title), DaysRented = daysRented}; }
private static Movie BuildMovie(TypeOfMovie priceCode, string title) { return new Movie { PriceCode = priceCode, Title = title }; }
public static void GetRentalInformation(string[] titles, TypeOfMovie[] priceCodesOfMovies, int[] daysRented) { Titles = titles; PriceCodesOfMovies = priceCodesOfMovies; DaysRented = daysRented; }