protected void Application_Start()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<SurveyContext, Migrations.Configuration>());
            //// Database.SetInitializer<SurveyContext>(new DropCreateDatabaseIfModelChanges<SurveyContext>()); 

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            GlobalConfiguration.Configuration.DependencyResolver = new SimpleDependencyResolver();

            using (var context = new SurveyContext())
            {
                var dummy = context.Surveys.FirstOrDefault();
            }

            InitializeSecurity();
        }
        public SurveyRepository()
        {
            var connectionString = ConfigurationManager.ConnectionStrings["SurveyConnection"].ConnectionString;

            this.surveyContext = new SurveyContext(connectionString);
        }
 public SurveyRepository()
 {
     var connectionString = ConfigurationManager.ConnectionStrings["SurveyConnection"].ConnectionString;
     this.surveyContext = new SurveyContext(connectionString);
 }