I have a question. I am working on a single site on Asp.Net that uses some ORM. I need to use several FullTextSearch functions like Contains. But when I try to generate it using this ORM, it generates such SQL code
SELECT [Extent1].[ID] AS [ID], [Extent1].[Name] AS [Name] FROM [dbo].[SomeTable] AS [Extent1] WHERE (Contains([Extent1].[Name], N'qq')) = 1
SQL cannot parse it because Contains does not return a bit value. And, unfortunately, I cannot change the process of generating SQL queries, but I can change the instructions in it.
My question is: is it possible to transfer the CONTAINS function call to something else? I tried to create another function that will contain SELECT with contains, but this requires specific table \ column objects, and I do not want to do one function for each table.
EDIT
I can change the result type for this function in ORM. In the previous example, the result type is bit. I can change it to int, nvarchar, etc. But, as I understand it, in SQL there is no Boolean type, and I can not specify it.
source share