mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(dir): ♻ support sync disposal of dbcontext
This commit is contained in:
parent
564433a48e
commit
fa340aac3c
1 changed files with 6 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
|
||||
internal class QueryContext : IQueryContext, IAsyncDisposable
|
||||
internal class QueryContext : IQueryContext, IAsyncDisposable, IDisposable
|
||||
{
|
||||
private readonly QueryDbContext _dbContext;
|
||||
|
||||
|
|
@ -17,6 +17,11 @@ public ValueTask DisposeAsync()
|
|||
return _dbContext.DisposeAsync();
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
_dbContext.Dispose();
|
||||
}
|
||||
|
||||
public IQueryable<FilterList> FilterLists => _dbContext.FilterLists.AsNoTracking();
|
||||
public IQueryable<Language> Languages => _dbContext.Languages.AsNoTracking();
|
||||
public IQueryable<License> Licenses => _dbContext.Licenses.AsNoTracking();
|
||||
|
|
|
|||
Loading…
Reference in a new issue