我有以下课程:
public class Movie
{
string Name get; set;
string Director get; set;
IList<String> Tags get; set;
}
如何查询标签?我想用like %term%
. 我试过了/term/i
,但它不起作用。
term = string.Format(@"/{0}/i", term);
var tags = db.GetCollection().Find(
new { Tags = term },
new { Tags = OrderBy.Descending },
new { Tags = 1}, 8, 0).ToList();
有任何想法吗?