Example #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;
        }
Example #2
0
        public StoreModel StoreModelMapping(StoreEntity source)
        {
            if (source == null)
            {
                return null;
            }

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

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

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

            return result;
        }