コード例 #1
0
        public PoiDTO ToAPoiForACityDto(PointOfInterest pointOfInterest)
        {
            var pointOfInterestDto = new PoiDTO()
            {
                Id              = pointOfInterest.Id,
                Name            = pointOfInterest.Name,
                Descritption    = pointOfInterest.Descritption,
                FullDescription = pointOfInterest.FullDescritption,
                Logo            = pointOfInterest.Logo,
                Picture         = pointOfInterest.Picture,
                Longitude       = pointOfInterest.Longitude,
                Latitude        = pointOfInterest.Latitude,
            };

            return(pointOfInterestDto);
        }
コード例 #2
0
        public PointOfInterest ConvertToEntity(int cityId, PoiDTO pointOfInterestDto)
        {
            var pointOfInterest = new PointOfInterest()
            {
                Id               = pointOfInterestDto.Id,
                CityId           = cityId,
                Descritption     = pointOfInterestDto.Descritption,
                FullDescritption = pointOfInterestDto.FullDescription,
                Logo             = pointOfInterestDto.Logo,
                Picture          = pointOfInterestDto.Picture,
                Longitude        = pointOfInterestDto.Longitude,
                Latitude         = pointOfInterestDto.Latitude,
                Name             = pointOfInterestDto.Name
            };

            return(pointOfInterest);
        }