I am using Linq2Couchbase to retrieve the data. Today, I spent a considerable time on one query where I have to use Where<> condition.(Code Below)
foreach (var i in queryTour.Itineraries)
{
var querySch = (from s in db.Query<Schedule>()
where s.type == "schedule" && s.tour == queryTour.Name
select s).ToList();
I have created the CouchBase documents with the fields’ names starting with Capital letters ( eg: Name, Tour etc). In the above query, first I was trying “s.Tour” and the Linq was not at all fetching any data. After long time of try by rearranging the queries and other ways, I thought like will try changing the naming convention( because I found that the entries in beer-sample bucket had field names in small letters), and to my surprise , the query worked.
I donot know whether I am missing any basic knowledge , but it looked strange when it worked as soon as changed the field names. Can any one tell me the reason ?