Migrate Show.Date from DateOnly to DateTime to support time of day

Removes DateOnly/DateTime conversion boilerplate from all Show endpoints
and adds the corresponding EF Core migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 18:01:12 +02:00
parent b3612f5bec
commit 71b7a53e59
8 changed files with 1997 additions and 12 deletions
@@ -20,7 +20,7 @@ public class CreateShowEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoin
Place = req.Place ?? string.Empty,
Description = req.Description,
PyrotechnicImplementationPlan = req.PyrotechnicImplementationPlan ?? string.Empty,
Date = req.Date.HasValue ? DateOnly.FromDateTime(req.Date.Value) : null,
Date = req.Date,
CityId = req.CityId
};
@@ -34,7 +34,7 @@ public class CreateShowEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoin
Place = show.Place,
Description = show.Description,
PyrotechnicImplementationPlan = show.PyrotechnicImplementationPlan,
Date = show.Date.HasValue ? show.Date.Value.ToDateTime(TimeOnly.MinValue) : null,
Date = show.Date,
CityId = show.CityId
};