public static externalDTO.EventInLocation MapFromDomain(internalDTO.EventInLocation eventInLocation) { var res = eventInLocation == null ? null : new externalDTO.EventInLocation() { Id = eventInLocation.Id, Location = LocationMapper.MapFromDomain(eventInLocation.Location), LocationId = eventInLocation.LocationId, Event = EventMapper.MapFromDomain(eventInLocation.Event), EventId = eventInLocation.EventId }; return(res); }
public static externalDTO.Competition MapFromDomain(internalDTO.Competition competition) { var res = competition == null ? null : new externalDTO.Competition { Id = competition.Id, Title = competition.Title.Translate(), Comment = competition.Comment.Translate(), Start = competition.Start, End = competition.End, LocationId = competition.LocationId, Location = LocationMapper.MapFromDomain(competition.Location) }; return(res); }
public static externalDTO.Event MapFromDomain(internalDTO.Event Event) { var res = Event == null ? null : new externalDTO.Event() { Id = Event.Id, Name = Event.Name, Description = Event.Description, NextEventId = Event.NextEventId, SubEventId = Event.SubEventId, AppUserId = Event.AppUserId, AdministrativeUnits = Event.EventAdministrativeUnit?.Select(item => AdministrativeUnitMapper.MapFromDomain(item.AdministrativeUnit)).ToList(), Locations = Event.EventLocations?.Select(item => LocationMapper.MapFromDomain(item.Location)).ToList(), EventTypes = Event.EventTypes?.Select(item => EventTypeMapper.MapFromDomain(item.EventType)).ToList(), ImageSrc = Event.ImageSrc, EventDate = Event.EventDate }; return(res); }