Permalink
Browse files

use options

  • Loading branch information...
1 parent 7363e66 commit 8de0f15f85d742ccb42ddfcb015b3b9db065421f @friism committed Feb 17, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 RavenDBTest/Global.asax.cs
View
@@ -1,7 +1,6 @@
-using System.Configuration;
-using System.Linq;
-using System.Web.Mvc;
+using System.Web.Mvc;
using System.Web.Routing;
+using Raven.Abstractions.Data;
using Raven.Client.Document;
namespace RavenDBTest
@@ -27,10 +26,14 @@ protected void Application_Start()
RegisterRoutes(RouteTable.Routes);
- var connectionString = ConfigurationManager.ConnectionStrings["RavenDB"].ConnectionString;
+ var parser = ConnectionStringParser<RavenConnectionStringOptions>.FromConnectionStringName("RavenDB");
+
+ Store = new DocumentStore
+ {
+ ApiKey = parser.ConnectionStringOptions.ApiKey,
+ Url = parser.ConnectionStringOptions.Url,
+ };
- Store = new DocumentStore();
- Store.ParseConnectionString(connectionString);
Store.Initialize();
}
}

0 comments on commit 8de0f15

Please sign in to comment.