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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -