public async Task <IActionResult> Create([Bind("Id,Description")] Responsibility responsibility) { if (ModelState.IsValid) { _context.Add(responsibility); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(responsibility)); }
public async Task <IActionResult> Create([Bind("Id,JobId,JobSiteId,Url,Text")] JobPosting jobPosting) { if (ModelState.IsValid) { _context.Add(jobPosting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(jobPosting)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Employer employer) { if (ModelState.IsValid) { _context.Add(employer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employer)); }