Ejemplo n.º 1
0
        public static string GetSqlType(Type csType)
        {
            if (csType != null)
            {
                if (MyTypeHelper.IsInteger(csType))
                {
                    return("int");
                }

                else if (MyTypeHelper.IsNumeric(csType))
                {
                    return("real");
                }

                else if (MyTypeHelper.IsDateTime(csType))
                {
                    return("datetime");
                }

                else if (MyTypeHelper.IsTimeSpan(csType))
                {
                    return("datetime");
                }
            }

            return("nvarchar(max)");
        }