public async Task <IActionResult> Edit(int id, [Bind("AmazonBulletPointID,BulletPoint")] AmazonBulletPoint amazonBulletPoint) { if (id != amazonBulletPoint.AmazonBulletPointID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(amazonBulletPoint); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AmazonBulletPointExists(amazonBulletPoint.AmazonBulletPointID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(amazonBulletPoint)); }
public async Task <IActionResult> Create([Bind("AmazonBulletPointID,BulletPoint")] AmazonBulletPoint amazonBulletPoint) { if (ModelState.IsValid) { _context.Add(amazonBulletPoint); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(amazonBulletPoint)); }