C# Generic .Contains() method implementing SqlFunctions.StringConvert in Entity Framework
问题 I have a generic method which dynamically creates a query in Entity Framework. I use this as a search function on data table headers. The function works perfectly if the Entity property type/SQL data type is a string. This is because of the .Contains() extensions. The problem comes in when the data type is something other than a string. These data types don't have the .Contains() extension. I would like to be able to use this method across all data types, and have found that I could possibly