Calling object method through hangfire
BackgroundJob.Enqueue((() => job.SomeMethod(arg))); As I understand it, the method will be executed in a separate process, and the arg parameter is serialized. How to write something to the database from the SomeMethod method, for example, to access some repository or return the result object?