Add consumption logic and endpoints

This commit is contained in:
2024-08-23 18:02:18 +02:00
parent d47e4c1971
commit 2463c11be3
22 changed files with 979 additions and 23 deletions

View File

@@ -13,12 +13,12 @@ public static class GetCar
.WithTags("Cars");
}
public static async Task<IResult> Endpoint(
private static async Task<IResult> Endpoint(
Guid id,
ApplicationDbContext dbContext,
CancellationToken cancellationToken)
{
var car = await dbContext.Cars.FindAsync([new CarId(id)], cancellationToken: cancellationToken);
Car? car = await dbContext.Cars.FindAsync([new CarId(id)], cancellationToken: cancellationToken);
if (car is null)
{