Example #1
0
        public static ShopDetail ConvertShopDetail(ShopInSql model)
        {
            if (model != null)
            {
                return model;
            }

            return null;
        }
Example #2
0
        public static ShopInSql ConvertShopInSql(ShopDetail model)
        {
            if (model != null)
            {
                var r = new ShopInSql();

                //映射处理
                var map = new TypeMapping<ShopDetail, ShopInSql>();
                map.AutoMap();
                map.CopyLeftToRight(model, r);

                r.AreaId = r.Areas.Select(e => e.Key).ToList();

                return r;
            }

            return null;
        }