コード例 #1
0
        public StoreDataUnitOfWork(string connectionString)
        {
            //Needed if config file is in the separate assembly.
            var type = typeof(System.Data.Entity.SqlServer.SqlProviderServices);

            //Used for design time DI configuration
            if (connectionString == "{connectionString}")
            {
                connectionString = ConfigurationManager.ConnectionStrings["StoreDataContext"].ConnectionString;
            }
            this.context = new StoreDataContext(connectionString);
        }
コード例 #2
0
 public StoreDataUnitOfWork(string connectionString)
 {
     //Needed if config file is in the separate assembly.
     var type = typeof(System.Data.Entity.SqlServer.SqlProviderServices);            
     
     //Used for design time DI configuration
     if (connectionString == "{connectionString}")
     {
         connectionString = ConfigurationManager.ConnectionStrings["StoreDataContext"].ConnectionString;
     }
     this.context = new StoreDataContext();
 }