public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } await store.InsertAsync(Student); return(RedirectToPage("/Student")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } if (Record.Total > 100) { return(Page()); } await store.InsertAsync(Record); return(Redirect("/Record?courseId=" + Record.CourseId.ToString())); }