Created
October 22, 2010 11:05
-
-
Save anonymous/640352 to your computer and use it in GitHub Desktop.
AddScalarValues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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