Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use not user provided db context? #22

Closed
artworkad opened this issue Dec 13, 2021 · 1 comment
Closed

How to use not user provided db context? #22

artworkad opened this issue Dec 13, 2021 · 1 comment
Labels
question Further information is requested

Comments

@artworkad
Copy link

artworkad commented Dec 13, 2021

Can you add more documentation on how this library is supposed to work? At first I expected it to expose the DbContext so that I can do the following:

Jobs = await _context.Jobs
  // Do more fluent stuff
  .ToListAsync(cancellationToken)

But I could not find any way to achieve that. I am interested in having access to the context, so that I can use IQueryable. I also tried my own DbContext, but was getting SqlException: Invalid object name 'HangfireCounter'.

@sergezhigunov sergezhigunov added the question Further information is requested label Nov 22, 2022
@sergezhigunov
Copy link
Owner

To implement custom queries you should use your own context.
Then you can use entities like

yourOwnContext.Set<HangfireJob>();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants