public async Task <IActionResult> Create([Bind("Id,PartName,PartCost")] Part part) { if (ModelState.IsValid) { _context.Add(part); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(part)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Item item) { if (ModelState.IsValid) { _context.Add(item); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(item)); }