I’ll need to pass this object to the corresponding View. For example, I’d like to queue the job of finding an object in the database:
Student student = db.Students.Find(id)
This returns a student object whether null or not, how do I enqueue such job?
BackgroundJob.Enqueue(() => Student student = db.Students.Find(id); //This gives me an error
......................................................
Student student;
BackgroundJob.Enqueue(() => student = db.Students.Find(id); //This also gives me an error