public void AddReportJob(ReportJob reportJob) { if (reportJob == null) { throw new ArgumentNullException(nameof(reportJob)); } _context.Add(reportJob); }
public async Task <IActionResult> Create([Bind("idCrypto,Name,Symbol,Price,Change24h,Change7d")] Crypto crypto) { if (ModelState.IsValid) { _context.Add(crypto); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(crypto)); }