C# net core 实体转Url参数
public static string ToUrlParams(this object obj) { return string.Join("&", obj.GetType().GetProperties().Where(x => x.GetValue(obj)!= null).Select(x => $"{x.Name}={HttpUtility.UrlEncode(x.value.ToString())}")); }
public static string ToUrlParams(this object obj) { return string.Join("&", obj.GetType().GetProperties().Where(x => x.GetValue(obj)!= null).Select(x => $"{x.Name}={HttpUtility.UrlEncode(x.value.ToString())}")); }