public async Task <IActionResult> Create([Bind("Name,Email,Id,Status")] Employee employee) { if (ModelState.IsValid) { _context.Add(employee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employee)); }
public async Task <IActionResult> Create([Bind("InitialDate,FinalDate,Price,Id,Status")] Parking parking) { if (ModelState.IsValid) { _context.Add(parking); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(parking)); }
public async Task <IActionResult> Create([Bind("LicensePlate,CarModel,Id,Status")] Vehicle vehicle) { if (ModelState.IsValid) { _context.Add(vehicle); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(vehicle)); }