namespace TestWeb.Core.Jobs; using Infra; public static class DeleteJobEndpoint { public static async Task> Handle( int id, AppDbContext db, CancellationToken ct) { var rowsDeleted = await db.Jobs .Where(x => x.Id == id) .ExecuteDeleteAsync(ct); return rowsDeleted == 1 ? TypedResults.Ok() : TypedResults.NotFound(); } }