@SUAT SUPHI, Welcome to Microsoft Q&A, if you want to make the function to replace string.
You could try the following code.
_connection.CreateFunction("likeit",(string x,string y)=> y, isDeterministic: true);
Then, you could call it in the commandtext like the following:
string sql = "select * from Posts where Title==likeit('i','h')";
The result is equal to
select * from Posts where Title='h'.
Note: I suggest that you don't use the like keyword in the sql because it already has some definitions.
Hope my solution could help you.
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our [documentation] to enable e-mail notifications if you want to receive the related email notification for this thread.