Feedeem.Coding 17.11.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Feedeem.Coding --version 17.11.1
NuGet\Install-Package Feedeem.Coding -Version 17.11.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Feedeem.Coding" Version="17.11.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Feedeem.Coding --version 17.11.1
#r "nuget: Feedeem.Coding, 17.11.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Feedeem.Coding as a Cake Addin
#addin nuget:?package=Feedeem.Coding&version=17.11.1

// Install Feedeem.Coding as a Cake Tool
#tool nuget:?package=Feedeem.Coding&version=17.11.1

/************************************************************ From: http://www.feedeem.com/
Create Date: 20110823
************************************************************/

using System; using System.Data; using System.Linq;

namespace Feedeem.Coding { /// <summary> /// Database Table's Column. /// </summary> [Serializable] public class Column { // sql data types extracted from sql server: SELECT * FROM systypes private string[] dbTypes;

    /// <summary>
    /// 列名
    /// </summary>
    public string ColumnName { get; set; }

    /// <summary>
    /// 原始列名(在数据库定义)
    /// </summary>
    public string ColumnNameOriginal { get; set; }

    /// <summary>
    /// 列名(中文)
    /// </summary>
    public string ColumnNameCN { get; set; }

    /// <summary>
    /// 是否为键(主键或外键)
    /// </summary>
    public bool IsKey
    {
        get;
        set;
    }

    /// <summary>
    /// 是否为主键
    /// </summary>
    public bool IsPrimaryKey { get; set; }

    /// <summary>
    /// 是否为外键
    /// </summary>
    public bool IsForeignKey
    {
        get
        {
            return this.IsKey && !this.IsPrimaryKey;
        }
    }

    /// <summary>
    /// 是否自增
    /// </summary>
    public bool IsIdentity { get; set; }

    /// <summary>
    /// 是否为计算列
    /// </summary>
    public bool IsComputed { get; set; }

    /// <summary>
    /// 数据库数据类型
    /// </summary>
    public string DbType { get; set; }

    /// <summary>
    /// 枚举类型SqlDbType
    /// </summary>
    public string SqlDbType
    {
        get
        {
             dbTypes  = new string[]{"image","text","uniqueidentifier",
            "tinyint","smallint","int","smalldatetime",
            "real","money","datetime","float","sql_variant", /* no found */
            "ntext","bit","decimal","numeric", /* no found. */
            "smallmoney","bigint","varbinary","varchar","binary",
            "char","timestamp","nvarchar","nchar","xml",};
            
            var dbtype = this.DbType;

            if (this.DbType == "sql_variant")
            {
                dbtype = "variant";
            }
            else if (this.DbType == "numeric")
            {
                dbtype = "numeric";
            }
            else if(!dbTypes.Contains(this.DbType))
            {
                dbtype = "Udt";
            }

            return ((SqlDbType)Enum.Parse(typeof(SqlDbType), dbtype, true)).ToString();
        }
    }

    /// <summary>
    /// C#语言数据类型
    /// </summary>
    public string CsType { get; set; }

    /// <summary>
    /// Java语言数据类型
    /// </summary>
    public string JavaType { get; set; }

    /// <summary>
    /// 是否为可空
    /// </summary>
    public bool Nullable { get; set; }

    /// <summary>
    /// 允许存入的字符长度
    /// </summary>
    /// <example>1024,(max),(18,2)</example>
    public string Length { get; set; }

    /// <summary>
    /// Scale
    /// </summary>
    public string Scale { get; set; }

    /// <summary>
    /// 序号
    /// </summary>
    public int Order { get; set; }

    /// <summary>
    /// 列默认值
    /// </summary>
    public string DefaultValue { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    private string description;
    public string Description
    {
        get
        {
            if (string.IsNullOrWhiteSpace(description)) { return this.ColumnName; }
            return description;
        }
        set
        {
            description = value;
        }
    }
}

}

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
20.0.3 1,134 3/11/2020
20.0.2 987 3/6/2020
20.0.1 1,093 3/5/2020
20.0.0 1,008 2/1/2020
19.1.1 1,069 7/30/2019
19.0.6 1,055 6/29/2019
18.0.3 1,441 7/25/2018
18.0.2 1,460 5/19/2018
18.0.1 1,624 5/4/2018
17.12.7 1,567 5/4/2018
17.12.6 1,559 5/4/2018
17.12.5 1,349 12/4/2017
17.12.3 1,429 12/4/2017
17.12.2 1,426 12/4/2017
17.12.1 1,323 12/4/2017
17.11.2 1,386 11/18/2017
17.11.1 1,496 11/18/2017