From 149f4f325c068659f458b8efd327bc5d338db760 Mon Sep 17 00:00:00 2001 From: cernont Date: Thu, 9 Oct 2025 17:54:25 +0200 Subject: [PATCH] improve ReadShowDto.cs --- PF3/DTO/Show/Response/ReadShowDto.cs | 11 +++++++++++ PF3/Endpoint/Show/GetShowEndpoint.cs | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/PF3/DTO/Show/Response/ReadShowDto.cs b/PF3/DTO/Show/Response/ReadShowDto.cs index 397b527..74a3593 100644 --- a/PF3/DTO/Show/Response/ReadShowDto.cs +++ b/PF3/DTO/Show/Response/ReadShowDto.cs @@ -1,4 +1,5 @@ using System; +using PF3.Models; namespace PF3.DTO.Show.Response; @@ -10,4 +11,14 @@ public class ReadShowDto public string? Description { get; set; } public string? PyrotechnicImplementationPlan { get; set; } public DateTime? Date { get; set; } + + public int CityId { get; set; } + public string? City { get; set; } + + public List? ShowStaffs { get; set; } + public List? ShowTrucks { get; set; } + public List? SoundTimecodes { get; set; } + public List? ProductTimecodes { get; set; } + public List? Contracts { get; set; } + public List? ShowMaterials { get; set; } } \ No newline at end of file diff --git a/PF3/Endpoint/Show/GetShowEndpoint.cs b/PF3/Endpoint/Show/GetShowEndpoint.cs index 070e4fa..c43ada3 100644 --- a/PF3/Endpoint/Show/GetShowEndpoint.cs +++ b/PF3/Endpoint/Show/GetShowEndpoint.cs @@ -16,6 +16,13 @@ public class GetShowEndpoint(PyroFetesDbContext pyroFetesDbContext):Endpoint s.City) + .Include(s => s.ShowStaffs) + .Include(s => s.ShowTrucks) + .Include(s => s.SoundTimecodes) + .Include(s => s.ProductTimecodes) + .Include(s => s.Contracts) + .Include(s => s.ShowMaterials) .Where(a => a.Id == req.Id) .Select(a => new ReadShowDto { @@ -23,7 +30,15 @@ public class GetShowEndpoint(PyroFetesDbContext pyroFetesDbContext):Endpoint