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();
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 }); }