public IActionResult EnterMovies(Movie response)
        {
            // add a movie to the list
            if (ModelState.IsValid)
            {
                ViewBag.Message = "Movie successfully added to the list.";
                _context.Add(response);
                _context.SaveChanges();
            }
            else
            {
                ViewBag.Message = "One or more inputs was invalid. The movie was not added to the list.";
            }

            return(View("Confirmation"));
        }
Beispiel #2
0
 public void Add(MovieDto entity)
 {
     _context.Movies.Add(entity);
     _context.SaveChanges();
 }
 public void Add(UserDto entity)
 {
     _context.Users.Add(entity);
     _context.SaveChanges();
 }
Beispiel #4
0
 public void Complete()
 {
     movieAppDbContext.SaveChanges();
 }