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