public async Task <IActionResult> Create([Bind("FirstName,LastName,JobRole,Id")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("Description,Id")] EventType eventType) { if (ModelState.IsValid) { _context.Add(eventType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(eventType)); }
public async Task <IActionResult> Create([Bind("Name,Address,Id")] School school) { if (ModelState.IsValid) { _context.Add(school); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(school)); }
public async Task <IActionResult> Create([Bind("EventName,SchoolID,Place,Id")] Event @event) { if (ModelState.IsValid) { _context.Add(@event); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(@event)); }
public async Task <IActionResult> Create([Bind("FirstName,LastName,DoB,Id")] Student student) { if (ModelState.IsValid) { _context.Add(student); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(student)); }
public async Task <IActionResult> Create([Bind("CompetitionType,LocationName,StartDate,FinishDate,Id")] Competition competition) { if (ModelState.IsValid) { _context.Add(competition); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(competition)); }