Skip to content

Instantly share code, notes, and snippets.

Created October 22, 2010 11:05
Show Gist options
  • Select an option

  • Save anonymous/640352 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/640352 to your computer and use it in GitHub Desktop.
AddScalarValues
protected ISQLQuery AddScalarValues(ISQLQuery query, Type type)
{
var info = type.GetProperties();
foreach (var propertyInfo in info)
{
query.AddScalar(propertyInfo.Name, TypeFactory.HeuristicType(propertyInfo.PropertyType.FullName));
}
return query;
}
protected ISQLQuery AddScalarValues(ISQLQuery query, Type type, IList<string> IgnoreSet)
{
var info = type.GetProperties();
foreach (var propertyInfo in info)
{
if (!IgnoreSet.Contains(propertyInfo.PropertyType.FullName))
{
query.AddScalar(propertyInfo.Name, TypeFactory.HeuristicType(propertyInfo.PropertyType.FullName));
}
}
return query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment