Big impact when set property type in-properly

来源:互联网 发布:深圳 人工智能 政策 编辑:程序博客网 时间:2024/05/22 14:56

In sqlserver DB, for the string, we have types: NVARCHR, VARCHAR.

In mapping class, if you use default set the type to "string" but the column type is varchar in DB, that will cause a transfer in DB side when searching comparing, if unfortunately you have a huge data in the table, the DB transer will be more huge, it will deadblock you DB.

To solve it if in DB its type is VARCHAR, in Mapping class should use:

   [Property(Type = "AnsiString")] instead.

原创粉丝点击