- ODBC Drivers
- Java JDBC Drivers
- ADO.NET Providers
- SQL SSIS Components
- BizTalk Adapters
- Excel Add-Ins
- Power BI Connectors
- Tableau Connectors
- PowerShell Cmdlets
- Delphi & C++Builder
- Data Sync
- API Server
LINQPad でBusiness b-ridge データを操作
LINQPad でBusiness b-ridge にLINQ クエリを実行します。CData ADO.NET Provider for Business b-ridge は、LINQ やEntity Framework などの標準のADO.NET インターフェースを使ってBusiness b-ridge を操作可能にします。この記事では、LINQPad から接続してLINQ クエリを実行する方法を説明します。
データモデルの作成
本製品およびLINQPad をダウンロードおよびインストールしたら、Visual Studio で新しいクラスライブラリプロジェクトを作成します。
本製品を使用するためのEF 6を設定する方法については、ヘルプドキュメントを参照してください。
プロジェクトを右クリックし、[追加]→[新しい項目]→[ADO.NET Entity Data Model]をクリックします。ダイアログが表示されたら、データベースから[Code First]を選択します。 [New Connection]をクリックして、表示されたウィザードで接続文字列オプションを指定します。
When connecting to Business b-ridge, CompanyKey, ProjectKey, and SubscriptionKey are required.
To obtain the SubscriptionKey, follow the steps below:
- Log in to Business b-ridge API Protal and go to "Profile" in the "Your name" menu.
- In your subscription section click "Main Key" to retrieve their respective values.
Authenticate to Business b-ridge Account
Set the following connection properties to connect:
- CompanyKey: Set the Business b-ridge Company Key of the connection destination.
- ProjectKey: Set the Business b-ridge Project Key of the connection destination.
- SubscriptionKey: Set the value "Subscription Key".
一般的な接続文字列は次のとおりです。
希望するテーブルおよびビューを選択して[Finish]をクリックし、データモデルを作成します。
- プロジェクトをビルドします。生成されたファイルを使ってLINQPad でBusiness b-ridge 接続を作成できます。
LINQPad でBusiness b-ridge データに接続
必要な接続プロパティを取得してデータモデルアセンブリを作成したら、以下の手順に従ってLINQPad でデータモデルを使いはじめましょう。
LINQPad を開き[接続の追加]をクリックします。
[Use a typed data context from your own assembly]オプションを選択します。
[Entity Framework DbContext]を選択します。
[Path to Custom Assembly]ボックスの横にある[参照]をクリックして、プロジェクトフォルダを参照します。bin フォルダの下の.dll または.exe を参照します。
- DbContext の名前を選択します。
- 接続文字列をApp.Config に保存した場合は、App.Config へのパスを指定します。

これでLINQPad 経由でBusiness b-ridge にクエリできます。サポートされたLINQ クエリの例は、ヘルプドキュメントの「LINQ およびEntity Framework」を参照してください。
