RavenDB Error: var store isn't a global variable. How do I create a class that can use access documentstore? Any comments on why this code refuses to run is greatly appreciated
class Program
{
static void Main(string[] args)
{
var store = new DocumentStore
{
Urls = new[] { "http://localhost:8080" },
Database = "Tasks"
};
store.Initialize();
}
class OtherProgram
using (var session = Store.OpenSession())
{
var task = session.Load<Entity>(combinedInitial + email)
//More code
}