Setting string to be sql type of “varchar” instead of “nvarchar”

前端 未结 4 2071
醉酒成梦
醉酒成梦 2020-12-18 22:10

I have the following mapping:

public class LogEntryMap
{
    public LogEntryMap()
    {
        Map.Id(x => x.Id).GeneratedBy.Identity();
        Map(x =&         


        
4条回答
  •  天涯浪人
    2020-12-18 22:47

    We found using the "CustomType("AnsiString")" option does prevent it from using the nvarchar, however, it sets the field length of 8000 for a column that is specified as varchar(30). The 8000 varchar is much faster than 4000 nvarchar, but it is still causing huge problems with sql server overhead.

提交回复
热议问题