public async Task <IActionResult> Create([Bind("ID,UserID,Username,FullName,Email,PhoneNumber,SMSNumber,AccountStatus,ReceivesSMSAlertsNewDrivers,ReceivesSMSAlertsDriversTerminated,ReceivesSMSAlertsLongDriverWaits,SMSAlertDriverWaitTime")] Analyst analyst) { if (ModelState.IsValid) { _context.Add(analyst); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(analyst)); }
public async Task <IActionResult> Create([Bind("AnalysisID,AnalystID,DriverID")] Analysis analysis) { if (ModelState.IsValid) { _context.Add(analysis); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["AnalystID"] = new SelectList(_context.Analysts, "ID", "ID", analysis.AnalystID); ViewData["DriverID"] = new SelectList(_context.Drivers, "DriverID", "DriverID", analysis.DriverID); return(View(analysis)); }
public async Task AddAsync(Driver driver) { _context.Add(driver); await _context.SaveChangesAsync(); }
public async Task AddAsync(Leg leg) { _context.Add(leg); await _context.SaveChangesAsync(); }