Ejemplo n.º 1
0
        /// <summary>
        /// Initializes data that might not be available when the service is called.
        /// </summary>
        public GalleryService()
        {
            // TODO: Read from configuration or find another way to initialize
             _physicalApplicationPath = HttpContext.Current.Request.PhysicalApplicationPath;

             var db = new DatabaseEntities();
             if (!db.DatabaseExists())
             {
            // create database
            db.CreateDatabase();
             }
        }