几何尺寸与公差论坛

 找回密码
 注册
查看: 186|回复: 0

请用c#将SugarColumn的列长度从 nvarchar(500) 更改为 nvarchar(MAX)

[复制链接]
发表于 2023-2-9 20:07:23 | 显示全部楼层 |阅读模式
public class JsonData
{
    [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
    public int Id { get; set; }
    [SugarColumn(ColumnDataType = "nvarchar(MAX)")]
    public string Json { get; set; }
}
使用 SqlSugar 的 CodeFirst 生成数据库:
using (var db = new SqlSugarClient(connectionString))
{
    db.CodeFirst.InitTables(typeof(JsonData));
}

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-5-5 17:33 , Processed in 0.035984 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表