分表表名需要占位符 {year} English Message : table name need {year} 返回

SqlSugar 沟通中
3 86
该叫什么 - 发布于1周前
悬赏:0 飞吻

自动分表时
实体类

image.png

创建表

            if (entityType.GetCustomAttribute<SplitTableAttribute>() == null)

            {

                db.CodeFirst.InitTables(entityType);

            }

            else

            {

                /// 分表

                db.CodeFirst.SplitTables().InitTables(entityType);

            }

报错
image.png

这个是我哪里写错了吗

热忱回答3

  • 你用的自带的分表,还是自定义分表。

    0 回复
  • 目 前看不出问题,另外还要配置分表字段。

    0 回复
  • - - VIP0
    1周前

    @fate sta:自带的

    0 回复