Filtering contents by Terms in code?

Mar 12, 2012 at 5:24 PM

We have a Deal ContentType which has "Cities" and "Categories" Fields in DealPart.

I need a filtered list of DealParts for using in Controller, so I've created following method in DealService class:

public IEnumerable<DealPart> Get(int skip, int count, string city = "", string category = "")

return _contentManager.Query("Deal").Join<CommonPartRecord>().OrderByDescending(cr => cr.CreaedUtc)
                .WithQueryHintsFor("Deal").Slice(skip, count).ToList().Select(ci => ci.As<DealPart>());


But question is how is it possible to add a filter for Category and City there?

Any helps would be appreciated.