like the one below will perform more slowly than they could be run on a varchar column.

Explicitly marking them as such will improve the performance of EF queries as it would query with the right type.

dataContext.Tables.Where(k = k.MyStringProperty == someValue); 

Explicit type specification on the property though the Column attribute. 
[Column(TypeName="varchar")] 
public string MyStringProperty { get; set; }



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here