Add more logging and trace parameters
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Diagnostics;
|
||||
using Vegasco.Server.Api.Persistence;
|
||||
|
||||
namespace Vegasco.Server.Api.Cars;
|
||||
@@ -21,6 +22,9 @@ public static class DeleteCar
|
||||
ILoggerFactory loggerFactory,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
Activity? activity = Activity.Current;
|
||||
activity?.SetTag("id", id);
|
||||
|
||||
int rows = await dbContext.Cars
|
||||
.Where(x => x.Id == new CarId(id))
|
||||
.ExecuteDeleteAsync(cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user