コード例 #1
0
        private void PropertyBuilder(IMemberConfigurationExpression <Product, ProductResponse, string> obj)
        {
            var url = "https://localhost:44306/content";

            obj.MapFrom(s => s.PictureUrl);
            obj.AddTransform(x => string.IsNullOrEmpty(x) ? "No url found.." : $"{url}/{x}");
        }
コード例 #2
0
 public static void OnlyNumbers <TSource, TDestination>(this IMemberConfigurationExpression <TSource, TDestination, string> memberConfigurationExpression)
 {
     memberConfigurationExpression.AddTransform((value) => StringHelper.OnlyNumbers(value));
 }