Example #1
0
        static public Dictionary <string, object> ToDataRow(this System.Data.Common.DbDataRecord me)
        {
            string _message = string.Format("ToDictionary Call Failed");

            try {
                return(Enumerable.Range(0, me.FieldCount).ToDictionary(field => me.GetName(field).ToString(), field => me.GetValue(field)));
            }
            catch (Exception ex) {
                // err.WriteError(_message, ProcessHelper.GetProcessName(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType), ex);
            }
            return(new Dictionary <string, object>());
        }