public IActionResult OnPost() { if (!ModelState.IsValid) { return(Page()); } _courseSerervice.AddGroup(CourseGroups); return(RedirectToPage("Index")); }