-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
HI,
I have an issue with full-text. The sql script I execute on the server is
select * from dbo.ufn_search('(ISABOUT("mysearch") OR "mysearch")')
My function in the context is
[DbFunction("WordBankContext", "ufn_Search")]
public IQueryable<Search> FullSearch(string search)
{
if (!string.IsNullOrEmpty(search))
{
string[] tmp = search.Split(' ');
search = "";
foreach (string s in tmp)
{
if (!string.IsNullOrEmpty(search))
search += " AND ";
search += $"(ISABOUT(\"{s}\") OR \"{s}\")";
}
}
var searchParameter = search != null ? new ObjectParameter("search", search)
: new ObjectParameter("search", typeof(string));
return ((IObjectContextAdapter)this)
.ObjectContext.CreateQuery<Search>(string.Format("[{0}].{1}",
GetType().Name,
"[ufn_Search](@search)"),
searchParameter);
}
Metadata
Metadata
Assignees
Labels
No labels