I was following a tutorial on how to use RavenDB with ASP.Net, and it says to put the creation of the Document Store in the global.asax, so it is created once on application load.
I wanted to make my ASP.Net application so it can use any database, so I had planned to move the data access layer into a class library. The problem now is I don't know how I should access the RavenDB.
I know I can't create a new instance each time, so how would I do it? I realise I can pass in the instance of the RavenDB, but doing that would mean RavenDB would still be within the application itself, which I had hoped to avoid.
Any suggestions?