private void ConfigureNeo4j(IAppBuilder app) { // Create and connect GraphClient for use in dal and identity framework Client = new GraphClient(new Uri(ConfigurationManager.ConnectionStrings["neo4j"].ConnectionString)); Client.Connect(); // Create dal and initiate DB Dal = new DatabaseAbstrationLayer(Client, ConfigurationManager.AppSettings.Get("DataDir")); InitiateDB(); // Create reference to dal in OwinContext, so it can be accessed by Controllers app.CreatePerOwinContext(() => Dal); // Create reference to GraphClientWrapper in OwinContext, so it can be accessed by SolitudeUserStore app.CreatePerOwinContext(() => { return new GraphClientWrapper(Client); }); // Create Solitude UserManager and SignInManager to control users app.CreatePerOwinContext<SolitudeUserManager>(SolitudeUserManager.Create); app.CreatePerOwinContext<SolitudeSignInManager>(SolitudeSignInManager.Create); }
public BirthdateJob(string name, TimeSpan time, DatabaseAbstrationLayer dal) : base(name,time) { Dal = dal; }
public EventEndedJob(string name, TimeSpan time, DatabaseAbstrationLayer dal) : base(name,time) { Dal = dal; }
public DalTests() { Client = new GraphClient(new Uri(ConfigurationManager.ConnectionStrings ["neo4j"].ConnectionString)); Client.Connect (); Dal = new DatabaseAbstrationLayer (Client); }