public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Movie = await _context.Movies
                    .Include(m => m.Category).FirstOrDefaultAsync(m => m.Id == id);

            if (Movie == null)
            {
                return(NotFound());
            }
            ViewData["CategoryId"] = new SelectList(_context.Set <Category>(), "CategoryId", "CategoryId");
            return(Page());
        }
 public IActionResult OnGet()
 {
     ViewData["CategoryId"] = new SelectList(_context.Set <Category>(), "CategoryId", "CategoryId");
     return(Page());
 }