示例#1
0
 public static IDictionary <Column, object> ConvertAnonymousToProjections(Table table, object projections) =>
 projections as IDictionary <Column, object> ?? (
     from projection in projections as IDictionary <string, object> ?? ObjectToDictionaryRegistry.Convert(projections)
     let column = table[projection.Key]
                      where column != null
                  select new KeyValuePair <Column, object>(column, projection.Value)
     ).ToDictionary();
示例#2
0
 static IEnumerable <Parameter> ConvertToParameters <T>(object parameters)
 {
     return(from projection in parameters as IDictionary <string, object> ?? ObjectToDictionaryRegistry.Convert(parameters)
            select new Parameter {
         Name = "@" + projection.Key, Value = projection.Value
     });
 }