NHibernate converting string parameters to nvarchar instead of varchar. How can I stop this?
- 阅读更多 关于 NHibernate converting string parameters to nvarchar instead of varchar. How can I stop this?
I have a class mapped to a view and am searching on first and last names in order to search for patient records. The view ultimately looks at the first and last name fields on the patient table (possibly others as well depending on input). When the criteria converts to SQL, it's entering my strings as nvarchar parameters. I've already used type="AnsiString" and length="50" on my mapping, but it still is converting these to nvarchar, which is causing a performance hit on my query. <class name="PatientSearchResult" table="vw_PatientSearch" mutable="false" > <id name="Id" type="Guid" column=