public async Task <IActionResult> Create([Bind("ID,liftername,squat,bench,deadlift")] Lifters lifter) { if (ModelState.IsValid) { _context.Add(lifter); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(lifter)); }
public async Task <IActionResult> Create([Bind("ID,ContactName,PhoneNumber,Address1,Address2,City,State,ZipCode,Notes")] Contact contact) { if (ModelState.IsValid) { _context.Add(contact); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(contact)); }