public async Task <IActionResult> Edit(int id, [Bind("Id,Date")] VancancyPostulations vancancyPostulations) { if (id != vancancyPostulations.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(vancancyPostulations); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VancancyPostulationsExists(vancancyPostulations.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(vancancyPostulations)); }
public async Task <IActionResult> Create([Bind("Id,Date")] VancancyPostulations vancancyPostulations) { if (ModelState.IsValid) { _context.Add(vancancyPostulations); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(vancancyPostulations)); }