From 450849b96884d8f0d1e1c6b74d48cb596a72758e Mon Sep 17 00:00:00 2001 From: Owczarek Kamil Date: Wed, 12 Jun 2024 20:51:04 +0200 Subject: [PATCH] Update EventMapper.cs --- Server/ReasnAPI/ReasnAPI/Mappers/EventMapper.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Server/ReasnAPI/ReasnAPI/Mappers/EventMapper.cs b/Server/ReasnAPI/ReasnAPI/Mappers/EventMapper.cs index a95ddca6..0cf4cea7 100644 --- a/Server/ReasnAPI/ReasnAPI/Mappers/EventMapper.cs +++ b/Server/ReasnAPI/ReasnAPI/Mappers/EventMapper.cs @@ -7,13 +7,9 @@ public static class EventMapper { public static EventDto ToDto(this Event eventToMap) { - var tags = eventToMap.Tags - .Select(t => new TagDto { Name = t.Name }) - .ToList(); + var tags = eventToMap.Tags.ToDtoList(); - var parameters = eventToMap.Parameters - .Select(p => new ParameterDto { Key = p.Key, Value = p.Value }) - .ToList(); + var parameters = eventToMap.Parameters.ToDtoList(); return new EventDto {