예제 #1
0
        public HomeController()
        {
            Console.WriteLine("Initial context");
            //AdRepo = new AdRepo(new AzureDbContext());
            AzureDbContext context = new AzureDbContext();

            CategoryRepo = new CategoryRepo(context);
            

        }
예제 #2
0
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections
            ServicePointManager.DefaultConnectionLimit = 12;

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            bool result = base.OnStart();

            // Initital db context;
            string connection = CloudConfigurationManager.GetSetting(dbSettingName);
            context = new AzureDbContext(connection);
            Trace.TraceInformation("WorkerRole1 has been started");

            return result;
        }