How to write like statements in Entity Framework when the liked valued contains %
问题 I know that String.Contains('x') would translate to LIKE '%x%' , and String.StartsWith('x') and String.EndsWith('x') would translate into LIKE '%x' and LIKE 'x%' respectively. However, I'm now in a situation in which I'm gonna build the LIKE operator regular expression clause in the business layer, and send it to the SQL Server through Entity Framework. I mean, now the end users builds the regular expression through a GUI and we need to retrieve the result based on that. For example, user