ADO.NET Provider for SAP Cloud for Customer

Build 25.0.9434

EF Core コンソールアプリケーション

データモデルの作成

アプリケーションのコンテキストクラスとエンティティクラスを作成するには、2つのアプローチがあります。 コードファーストアプローチ アプローチを使用して、クラスを手動で書くことでモデルを細かく調整できます。 あるいは、リバースエンジニアリング(Scaffolding) を使用してSAP Cloud for Customer スキーマからこれらのクラスを自動生成することもできます。

コードでLINQ コマンドを実行

EF Core をセットアップしてSAP Cloud for Customer プロバイダーを登録すると、LINQ を使用してデータのクエリを開始できます。

using System.Linq;
using MySolutionName.Models;

SAPHybrisC4CContext ents = new SAPHybrisC4CContext();
var AccountCollectionQuery = from AccountCollection in ents.AccountCollection
                   orderby AccountCollection.AccountName
                   select AccountCollection;

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434