public static internalDTO.EventInLocation MapFromDAL(externalDTO.EventInLocation eventInLocation)
        {
            var res = eventInLocation == null ? null : new internalDTO.EventInLocation()
            {
                Id         = eventInLocation.Id,
                Location   = LocationMapper.MapFromDAL(eventInLocation.Location),
                LocationId = eventInLocation.LocationId,
                Event      = EventMapper.MapFromDAL(eventInLocation.Event),
                EventId    = eventInLocation.EventId
            };

            return(res);
        }
Example #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);
        }
Example #3
0
        public static internalDTO.Competition MapFromDAL(externalDTO.Competition competition)
        {
            var res = competition == null ? null : new internalDTO.Competition
            {
                Id         = competition.Id,
                Title      = new internalDTO.MultiLangString(competition.Title),
                Comment    = new internalDTO.MultiLangString(competition.Comment),
                Start      = competition.Start,
                End        = competition.End,
                LocationId = competition.LocationId,
                Location   = LocationMapper.MapFromDAL(competition.Location)
            };

            return(res);
        }
Example #4
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);
        }