Beispiel #1
0
 /// <summary>
 /// The constructor creates a new DbContext class by connecting to a SQLite database bundled with the app.
 /// </summary>
 public DatabaseService()
 {
     string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
     string path = (System.IO.Path.GetDirectoryName(executable));
     AppDomain.CurrentDomain.SetData("DataDirectory", path);
     dbContext = new SnakDbContext();
 }
Beispiel #2
0
        /// <summary>
        /// The constructor creates a new DbContext class by connecting to a SQLite database bundled with the app.
        /// </summary>
        public DatabaseService()
        {
            string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
            string path       = (System.IO.Path.GetDirectoryName(executable));

            AppDomain.CurrentDomain.SetData("DataDirectory", path);
            dbContext = new SnakDbContext();
        }