Esempio n. 1
0
        /// <summary>
        /// Opens a new database in memory.
        /// </summary>
        /// <returns>An instance of <see cref="RecipeDatabase"/> that is ready to be queried.</returns>
        public static RecipeDatabase OpenInMemory()
        {
            var db = new RecipeDatabase(OdbFactory.OpenInMemory());

            db.Initialize();

            return(db);
        }
Esempio n. 2
0
        /// <summary>
        /// Opens a connection to the database.
        /// </summary>
        /// <returns>An instance of <see cref="RecipeDatabase"/> that is ready to be queried.</returns>
        public static RecipeDatabase Open()
        {
            var db = new RecipeDatabase(OdbFactory.Open(DATABASE_FILE_NAME));

            db.Initialize();

            return(db);
        }