Fixed bugs
This commit is contained in:
@ -27,7 +27,7 @@ namespace UserService.DatabaseLayer.Repositories
|
||||
await db.SaveChangesAsync(token).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(T entity, CancellationToken token = default)
|
||||
public virtual async Task DeleteAsync(T entity, CancellationToken token = default)
|
||||
{
|
||||
await using var db = new UserServiceDbContext();
|
||||
Context(db).Remove(entity);
|
||||
@ -45,7 +45,7 @@ namespace UserService.DatabaseLayer.Repositories
|
||||
await using var db = new UserServiceDbContext();
|
||||
return await Context(db).Include(x => x.Parent).FirstOrDefaultAsync(predicate, token).ConfigureAwait(false);
|
||||
}
|
||||
public async Task<bool> UpdateAsync(T entity, CancellationToken token = default)
|
||||
public virtual async Task<bool> UpdateAsync(T entity, CancellationToken token = default)
|
||||
{
|
||||
await using var db = new UserServiceDbContext();
|
||||
Context(db).Update(entity);
|
||||
|
Reference in New Issue
Block a user