couchbaselabs/Linq2Couchbase — pull request #5 by SamFold (2014-10-16 03:32:27+00:00)
Title: Where + WhereMissing

This is a series of commits to implement an initial version of Where/WhereMissing.

Where works as expected for the following LINQ Queries:

var query =
QueryFactory.Queryable(mockBucket.Object)
.Where(e => e.Age > 10 || e.FirstName == "Sam")
.Select(e => new { age = e.Age, name = e.FirstName });

OR

var query =
QueryFactory.Queryable(mockBucket.Object)
.Where(e => e.Email == "something@gmail.com")
.WhereMissing(g => g.Age)
.OrderBy(e => e.Age)
.Select(e => new { age = e.Age, name = e.FirstName });

These commits also add a variety of extra tests for Where/WhereMissing, OrderBy, and Select statements. The WhereMissing() functionality is added as recommended by Remotion guys: See here: https://groups.google.com/forum/#!topic/re-motion-users/VBlXrOHOsRg

Note: We may decide to use a slightly different syntax for WhereMissing, but it should be easy to change as I implemented it in the "hardest" way possible.

Multiple where and orderby statements are also supported in these commits.

I also added the Moq nuget package to the testing project to make mocking out the dependencies easier. It's used in the new test classes.