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)); }
public async Task <IActionResult> Create([Bind("ID,Name,Email,PhoneNumber")] Dealership dealership) { if (ModelState.IsValid) { _context.Add(dealership); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dealership)); }
public async Task <IActionResult> Create([Bind("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)); }