This project is read-only.

NDatabase and Linqpad

Dec 31, 2013 at 5:08 AM
I'm relatively new to using Linqpad, and just discovered NDatabase recently; I found details in the official documentation somewhat lacking, but that may be because I'm not familiar with using a DataContext class to describe the data persisted.

I'm hoping someone here can explain a few things (or point me to some excellent tutorial that describes the interaction of a DataContext to a database, like NDatabase, and Linqpad).

I notice that if I create a simple data context, e.g.
public class MyDataContext : DataContext
  public IQueryable<IFoo> Foos { get; set; }
I see the collection Foos underneath the loaded context in Linqpad; but other operations (attempting to view the top 100 rows in the grid, or performing LINQ queries for Foo objects in Foos) result in various errors. E.g. ArgumentNullException: Value cannot be null. I am still experimenting with what form my context should take, but the role of the context is still not clear to me so I'm just sort of blindly thrashing about until I find the right hole for the round-peg (square is clearly not the answer here, no matter how hard I try to jam it in).

It may just be my inexperience or it may be that I'm being obtuse. but I just can't seem to understand how to properly view the data in my .ndb in Linqpad.

Is Linqpad the only option to view data in an NDB file? Are there alternatives out there?

Thanks in advance, for any help offered!