Beispiel #1
0
        public IVehiculosSql ObtenerInstancia()
        {
            IVehiculosSql vehiculosSql = null;
            IVehiculosSql vehiculosPostgresql = null;
            vehiculosSql = new VehiculosSQLServer();
            vehiculosPostgresql = new VehiculosPostgres();

            return vehiculosSql;
        }
Beispiel #2
0
        public IVehiculosSql ObtenerInstancia()
        {
            IVehiculosSql vehiculosSql = null;
            switch (AccesoDatos.AccesoDatos.Instance.accesoDatos.ContextDataBase)
            {
                case ContextDataBase.SqlServer:
                    vehiculosSql = new VehiculosSQLServer();
                    break;
                case ContextDataBase.PostgreSql:
                   vehiculosSql = new VehiculosPostgres();
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }

            return vehiculosSql;
        }