Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }