• CodeSmith


    一、安装下载

    1.下载CodeSmith 6.5 完美破解版

    http://down.51cto.com/data/436296

    http://download.csdn.net/detail/gattaca2011/4389196

     2.下载CodeSmith 7.0 支持vs2013

    http://download.csdn.net/download/gattaca2011/8257675

    破解文章:http://www.cnblogs.com/xcsn/p/4529569.html

    3.CodeSmith开发系列资料总结

    http://terrylee.cnblogs.com/archive/2005/12/28/306254.aspx

    二、CodeSmith,SqlServer,C#中的类型对照

    SqlServer         CodeSmith                                   c#
    bigint                  Int64                                        Int64
    binary                 Binary                               System.Byte[]
    bit                      Boolean                                    bool
    char                  AnsiStringFixedLength              string
    datetime             DateTime                                   string
    decimal              Decimal                                    Decimal
    float                   Double                                        Double
    image                 Binary                                System.Byte[]
    int                      Int32                                            int
    money               Currency                                   Single
    nchar                 StringFixedLength                          string
    ntext                  String                                            string
    numeric             Decimal                                    Decimal
    nvarchar            String                                            string
    real                   Single                                            Single
    smalldatetime     DateTime                                       string
    smallint               Int16                                            Int16
    smallmoney         Currency                                   Single
    sql_variant          Object                                        Object
    text                     AnsiString                                   string
    timestamp           Binary                                    System.Byte[]
    tinyint                  Byte                                            Byte
    uniqueidentifier     Guid                                       System.Guid
    varbinary             Binary                                    System.Byte[]
    varchar                AnsiString                                   string

    其中有些类型为了处理简便,做了一些调整。如:DataTime类型转成string型处理

    三、使用MYSQL

      codesmith连接Mysql提示“找不到请求的 .Net Framework Data Provider。可能没有安装。"

    原文:https://www.cnblogs.com/smartsmile/p/6234085.html

    1,首先需要将MySql.Data.dll复制到codesmith安装目录下bin文件夹下,注意dll的版本

    2,其次因为codesmith7采用的是.net4.0的配置文件,(64位系统)找到C:WindowsMicrosoft.NetFramework64v4.0.30319Configmachine.config

    在其中的DbProviderFactories节点下添加

     <system.data>
            <DbProviderFactories>
              <remove invariant="MySql.Data.MySqlClient" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
            </DbProviderFactories>
        </system.data>

    注意其中的版本号要与上面复制到codesmith BIN下面mysql.data.dll版本号一致!

    重启codesmith,问题解决,配置CodeSmith连接字符串

    Database=xxx;Data Source=10.1.43.23;User Id=root;Password=123456;port=3305

     注:

    如找不到MySql.Data.dll,可以在项目或解决方案中使用nuget安装

    使用Nuget安装install-package Mysql.Data.Entity ,安装成功可以在packages中找到对应dll文件,右键查看版本信息

    注:直接安装mysql-connector-net-6.x.x.msi后也可以正常使用codesmith

  • 相关阅读:
    go request请求
    go 接口类型
    go http服务端和客户端
    go 带*号是指针型的, 所以要先初始化这个Address
    go 文档
    go 接口方和类方法 计算薪资
    go client
    ECS数据管理实践备份与恢复
    快速搭建LAMP环境
    Pycharm中设置py文件头部注释信息
  • 原文地址:https://www.cnblogs.com/xcsn/p/4208733.html
Copyright © 2020-2023  润新知