I am having issues with the latest MongoDB C# driver (v1.4.2.4500) crashing when I query this document:
{
"_id" : "4fdfe705b48c6b24dcab994a",
"CreatedDate" : new Date("6/18/2012 19:42:13"),
"UpdatedDate" : new Date("6/18/2012 19:42:13"),
"SiteId" : "4fdfe705b48c6b24dcab9939",
"ClientId" : "4fdfe705b48c6b24dcab9937",
"Account" :
,
"FbAccount" :
}
Query:
var q1 = from u in this.Repository.All<User>()
where u.FbAccount.Id == "832631911"
select u;
var foo1 = q1.First();
Repository:
public IQueryable<T> All<T>() where T : class, new()
{
return this.GetQuery<T>().FindAll().AsQueryable();
}
Exception:
[NullReferenceException: Object reference not set to an instance of an object.]
lambda_method(Closure , User ) +137
System.Linq.WhereEnumerableIterator`1.MoveNext() +155
System.Linq.Enumerable.First(IEnumerable`1 source) +244
lambda_method(Closure ) +322
System.Linq.Queryable.First(IQueryable`1 source) +382
AuctionCMS.Framework.Services.ClientService.GetByFacebookUserId(String fbUserId) in ClientService.cs:39
Am I doing something wrong or is this a bug?