public async Task <IActionResult> Edit(int id, [Bind("ID,Company,DatePosted,Experience,Hours,JobTitle,Languages,Location,Salary,URL")] WebsiteID websiteID) { if (id != websiteID.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(websiteID); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WebsiteIDExists(websiteID.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(websiteID)); }
public async Task <IActionResult> Create([Bind("ID,Company,DatePosted,Experience,Hours,JobTitle,Languages,Location,Salary,URL")] WebsiteID websiteID) { if (ModelState.IsValid) { _context.Add(websiteID); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(websiteID)); }