Modifs communication

This commit is contained in:
2026-06-09 13:29:58 +02:00
parent 7071910dc4
commit a88ce4cc7e
5 changed files with 25 additions and 6 deletions
@@ -14,12 +14,17 @@ public class GetAllCommunicationsEndpoint(PyroFetesDbContext pyroFetesDbContext)
public override async Task HandleAsync(CancellationToken ct)
{
List<GetCommunicationDto> communications = await pyroFetesDbContext.Communications.Select(x => new GetCommunicationDto()
List<GetCommunicationDto> communications = await pyroFetesDbContext.Communications.Include(x => x.Contact).Select(x => new GetCommunicationDto()
{
Id = x.Id,
Calling = x.Calling,
Email = x.Email,
Meeting = x.Meeting,
ContactId = x.ContactId,
ContactFirstName = x.Contact.FirstName,
ContactLastName = x.Contact.LastName,
ContactPhoneNumber = x.Contact.PhoneNumber,
ContactEmail = x.Contact.Email,
}).ToListAsync(ct);
await Send.OkAsync(communications, ct);