I have a few filters on my view, the first one is list by first name, last name and company name when one of these options are selected the user can then select a, b, c ... x, y, z to show only people starting with the selected letter.
if (collection["Filter"] == "2") {
presentations = presentations.Where(x => x.Person.FirstName.StartsWith("A"));
presentations = presentations.OrderBy(x => x.Person.FirstName);
}
Results returned are similar to
John Squirel
Basil Boywiz
David Smith
This doesn't seem to work, what am I missing?
I dug a little further, this is the query causing the problem.
SELECT [t0].[Description], [t0].[EventId], [t0].[Id], [t0].[PresentedOn],
[t0].[Slug], [t0].[SpeakerId], [t0].[Title], [t0].[Url]
FROM [Presentations] AS t0
LEFT OUTER JOIN [Speakers] AS t1 ON ([t1].[Id] = [t0].[Id])
WHERE ([t1].[FirstName] LIKE 'B' + '%')
ORDER BY [t1].[FirstName]