markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

Searching against a SQL Server full-text index using Contains is not supported. #369

Open rogersillito opened 9 years ago

rogersillito commented 9 years ago

I got here via a stack overflow post on the same topic: http://stackoverflow.com/a/16419314/998793.

Neither of the following are working for me:

var dubstepAlbums = db.Albums.FindAll(db.Albums.Description.Contains("dub-step"));
// throws "BadExpressionException: FindAll only accepts a criteria expression."

dubstepAlbums = db.Albums.All().Where(db.Albums.Description.Contains("dub-step"));
// throws "BadExpressionException: Where methods require a single criteria expression."

(where "Albums" refers to a column included in a full-text index definition).