示例#1
0
        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);
        }
示例#2
0
 public BirthdateJob(string name, TimeSpan time, DatabaseAbstrationLayer dal)
     : base(name,time)
 {
     Dal = dal;
 }
示例#3
0
 public EventEndedJob(string name, TimeSpan time, DatabaseAbstrationLayer dal)
     : base(name,time)
 {
     Dal = dal;
 }
示例#4
0
 public DalTests()
 {
     Client = new GraphClient(new Uri(ConfigurationManager.ConnectionStrings ["neo4j"].ConnectionString));
     Client.Connect ();
     Dal = new DatabaseAbstrationLayer (Client);
 }