Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 41b6b71b31 | |||
| 0702caa42d | |||
| ee6beef603 | |||
| 4f6dbfcd37 |
@@ -153,9 +153,7 @@ public sealed class ProductService(IDbContextFactory<MidrandBooksDbContext> cont
|
||||
{
|
||||
await using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||
|
||||
var query = context.Products
|
||||
.Include(i => i.Price)
|
||||
.AsQueryable();
|
||||
var query = context.Products.AsQueryable();
|
||||
|
||||
var cultureInfo = CultureInfo.InvariantCulture;
|
||||
|
||||
@@ -306,8 +304,7 @@ public sealed class ProductService(IDbContextFactory<MidrandBooksDbContext> cont
|
||||
{
|
||||
await using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||
|
||||
var product = await context.Products
|
||||
.Include(i => i.Price)
|
||||
var product = await context.Products
|
||||
.AsNoTracking().FirstOrDefaultAsync(p => p.Id == productId, cancellationToken);
|
||||
|
||||
return product is null
|
||||
|
||||
Reference in New Issue
Block a user