public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,UserName,Email,Company,Position,BirthDate")] Member member) { if (ModelState.IsValid) { _context.Add(member); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(member)); }
public async Task <IActionResult> Create([Bind("ID,Make,Model,Year,VIN,Colour,DealershipID")] Car car) { if (ModelState.IsValid) { _context.Add(car); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(car)); }