DbFirst生成的实体,bigint类型不正确 返回

SqlSugar
5 208

在mysql里是bigint,生成出来的为什么是object呢?

热忱回答5

  • fate sta fate sta VIP0
    2021/11/12
    你是用sqlsugar生成的还是用webfirst生成的
    0 回复
  • 程小笨 程小笨 VIP0
    2021/11/13

    @fate stasqlsugar

    0 回复
  • fate sta fate sta VIP0
    2021/11/13

     /// <summary>

               /// Desc:

               /// Default:

               /// Nullable:True

               /// </summary>           

               public long? xxx {get;set;}


    0 回复
  • fate sta fate sta VIP0
    2021/11/13

    经过测试可以的,你可以把你的建表语句发出来看看

    0 回复
  • fate sta fate sta VIP0
    2021/11/13

    DROP TABLE IF EXISTS `a`;

    CREATE TABLE `a`  (

      `Id` int(11) NOT NULL AUTO_INCREMENT,

      `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,

      `xxx` bigint(20) NOT NULL,

      PRIMARY KEY (`Id`) USING BTREE

    ) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;


    SET FOREIGN_KEY_CHECKS = 1;


    0 回复