Created
December 1, 2012 20:53
-
-
Save NTCoding/4185003 to your computer and use it in GitHub Desktop.
raven_config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static IDocumentStore GetStore() | |
| { | |
| var environment = ConfigurationManager.AppSettings["Environment"]; | |
| if (environment == "Azure") | |
| { | |
| return new DocumentStore | |
| { | |
| ConnectionStringName = "RavenDB", | |
| ApiKey = ConfigurationManager.AppSettings["RavenApiKey"], | |
| }; | |
| } | |
| if (environment == "Local") | |
| { | |
| return new EmbeddableDocumentStore | |
| { | |
| DataDirectory = "@App_Data\\Raven", | |
| UseEmbeddedHttpServer = true, | |
| }; | |
| } | |
| throw new ConfigurationException("No document store for environment: " + environment); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment