Skip to content

Instantly share code, notes, and snippets.

@NTCoding
Created December 1, 2012 20:53
Show Gist options
  • Select an option

  • Save NTCoding/4185003 to your computer and use it in GitHub Desktop.

Select an option

Save NTCoding/4185003 to your computer and use it in GitHub Desktop.
raven_config
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