public async Task<IActionResult> OnPostTryValidateAsync(){ var modifiedReleaseDate = DateTime.Now.Date; Movie.ReleaseDate = modifiedReleaseDate; ModelState.ClearValidationState(nameof(Movie)); if (!TryValidateModel(Movie, nameof(Movie))) { return Page(); } _context.Movies.Add(Movie); await _context.SaveChangesAsync(); return RedirectToPage("./Index");}