Entity Framework, Code First and Full Text Search

后端 未结 5 1086
逝去的感伤
逝去的感伤 2020-11-28 20:43

I realize that a lot of questions have been asked relating to full text search and Entity Framework, but I hope this question is a bit different.

I am using Entity F

5条回答
  •  心在旅途
    2020-11-28 21:33

    I have found that the easiest way to implement this is to setup and configure full-text-search in SQL Server and then use a stored procedure. Pass your arguments to SQL, allow the DB to do its job and return either a complex object or map the results to an entity. You don't necessarily have to have dynamic SQL, but it may be optimal. For example, if you need paging, you could pass in PageNumber and PageSize on every request without the need for dynamic SQL. However, if the number of arguments fluctuates per query, it will be the optimal solution.

提交回复
热议问题