Reputation: 389
I am trying to perform a query where I need to filter on a property before I perform a transform, but the return type of Where() is IQueryable which apparently does not have a TransformWith extension method. What gives? The documentation examples show exactly this being performed.
session.Query<LocalizedService, LocalizedServicesIndex>()
.Where(s => s.Culture == Thread.CurrentThread.CurrentCulture)
.TransformWith<LocalizedServiceTransformer, LocalizedService>()
.ToList();
The indexed documents are of Type Service, and LocalizedService is a projection Type that is stored in the index.
Anyone run into this?
Upvotes: 0
Views: 200
Reputation: 1177
The .Where(...) in your case is using the standard where in "System.Linq" namespace but in order to use .TransformWith<>() you need to use the .Where(...) extension in "Raven.Client.Linq" namespace.
Make sure you have:
using Raven.Client.Linq;
in your code.
Upvotes: 3