NHibernate converting string parameters to nvarchar instead of varchar. How can I stop this?

天涯浪子 提交于 2019-12-05 21:15:58

Try using the sql-type attribute in your mappings:

<property name="FirstName" length="50" />
    <column sql-type="varchar(50)" />
</property>

What performance issues are you having? It seems unlikely to me that treating strings as unicode would affect performance all that much.

Try this

<property name="FirstName" length="50">
    <column name="first_name" sql-type="varchar(50)" />
</property>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!