Ejemplo n.º 1
0
        private static void Initialize()
        {
            Console.WriteLine("Initializing...");
            var options = DataContextFactory.GetConfiguration();

            switch (options.Provider)
            {
            case DatabaseProviders.MySql:
                _factory = new MySqlDataContextFactory();
                break;

            case DatabaseProviders.MsSql:
                _factory = new MsSqlDataContextFactory();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }