private Dictionary<string, object> convertRow(Dictionary<string, string> row) { return row.SelectVals(val => Infervert(val)); }
public Dictionary<string, SqlColumnType> GetFieldTypes(string tablename, Dictionary<string,object> example = null) { example = example ?? new Dictionary<string, object>(); var exampleFields = example.SelectVals(v => SqlTypeConversion.GetSqlType(v)); var sqlFields = _getFieldTypes(tablename); var res = exampleFields.Union(sqlFields); return res; }
public void SelectValsTest() { Dictionary<string, int> dict = new Dictionary<string, int>(); dict.Add("Key 1", 1); dict.Add("Key 2", 2); dict.Add("Key 3", 3); Dictionary<string, decimal> dictCopy = new Dictionary<string, decimal>(); dictCopy.Add("Key 1", 1); dictCopy.Add("Key 2", 2); dictCopy.Add("Key 3", 3); Assert.AreEqual(dictCopy, dict.SelectVals(v => v.ConvertTo<decimal>())); }
private Dictionary<string, object> convertRow(Dictionary<string, string> row) { return row.SelectVals(val => Nvelope.Reading.TypeConversion.Infervert(val)); }