public async Task <IActionResult> Edit(long id, [Bind("JoinApplicationId,Name,Email,Experience")] JoinApplication joinApplication) { if (id != joinApplication.JoinApplicationId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(joinApplication); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JoinApplicationExists(joinApplication.JoinApplicationId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(joinApplication)); }
public async Task <IActionResult> Create([Bind("Name,Email,Experience")] JoinApplication joinApplication) { if (ModelState.IsValid) { _context.Add(joinApplication); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(joinApplication)); }