using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.IO;
using System.Reflection;

namespace ClientTransactions
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            // Specify where Entity Framework should look for the Northwind database.
            string dbFile = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Northwnd.mdf");
            if (!File.Exists(dbFile))
                throw new Exception("Sample database Northwnd.mdf must be created in the Data folder. Run the CreateSampleDB utility to create the Northwind database");
            base.OnStartup(e);
        }
    }
}
