コード例 #1
0
        public StoreInfoResponse StoreResponseMapping(StoreEntity source, CoordinateInfo coordinateInfo)
        {
            if (coordinateInfo == null)
            {
                return StoreResponseMapping(source);
            }

            var target = Mapper.Map<StoreEntity, StoreInfoResponse>(source);

            target.Distance = Distance(coordinateInfo, new CoordinateInfo((double)target.Longitude, (double)target.Latitude));

            return target;
        }
コード例 #2
0
        public StoreModel StoreModelMapping(StoreEntity source)
        {
            if (source == null)
            {
                return null;
            }

            var target = Mapper.Map<StoreEntity, StoreModel>(source);

            return target;
        }
コード例 #3
0
        public StoreInfoResponse StoreResponseMapping(StoreEntity source)
        {
            var target = Mapper.Map<StoreEntity, StoreInfoResponse>(source);

            return target;
        }
コード例 #4
0
        public StoreEntity StoreEntityMapping(StoreEntity source, StoreEntity target)
        {
            // result.Equery(target) = true;
            var result = Mapper.Map(source, target);

            return result;
        }