0

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?

4

1 回答 1

1

您将不得不从类库中引用 RavenDB,您无法真正绕过它。不过,您可能会发现以下文章很有见地:http: //novuscraft.com/blog/ravenb-and-the-repository-pattern

于 2013-08-04T10:15:03.090 回答