Entity Framework varchar To nVarchar -
i have column in database datatype varchar
, when issue command using linq in following example:
context.x.columnname=="somevalue"
, generated query uses nvarchar
. understand entity framework uses nvarchar
strings. tried use solution decorate column in entity class typename="varchar"
, works in above scenario.
[column(typename="varchar")] public string columnname{get;set;}
but when tried write query following way:
context.x.columnname.contains("somevalue")
the generated query still has nvarchar
...i tried solutions provided still having issue. tried setting data type in map file , tried set isunicode(false)
, non of them works.
can please me figure out solution problem...
i appreciate response...
Comments
Post a Comment