public class SpliceSqlWhere {
public static string GetSqlWhere(T t)
{
PropertyInfo[] pInfo = t.GetType().GetProperties();
List list = new List();
for (int i = 0; i < pInfo.Length; i++)
{
ObjectParameter para = new ObjectParameter();
para.Type = pInfo[i].PropertyType.Name;
para.Name = pInfo[i].Name;
para.Value = pInfo[i].GetValue(t);
list.Add(para);
}
}
}
class ObjectParameter {
public string Type { get; set; }
public string Name { get; set; }
public object Value { get; set; }
}