Merge pull request 'Redacted Price resolution from GetProductAsync' (#51) from midrandshop into master
Reviewed-on: #51
This commit was merged in pull request #51.
This commit is contained in:
@@ -304,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