0

私はEFを初めて使用し、構築しようとしています(私が思うに)私のオフィス用のかなり単純なアプリケーションです。入札したプロジェクトを追跡するためのアプリケーションを作成しています。各ビディテムは、(ナビゲーション プロパティを通じて) どのクライアント (入札者) に入札しているか (建設業界なので、プロジェクトごとに複数のクライアント)、およびプロジェクトのメモを追跡します。

ビッドトラッカーに EF (SQL Server を使用) を使用することを計画していますが、EWS マネージ API を使用して連絡先情報を取得/維持し、Office が Outlook から入手できる連絡先リストを 1 つだけ維持する必要があるようにしたいと考えています。

では、Entity Framework でデータ ソース (SQL Server と Exchange サーバー) を混在させることは可能ですか? もしそうなら、それを配線するのに役立つ良いリソースを教えてもらえますか?

簡略化されたモデルを次に示します (BidItemNoteは SQL Server に、Contactは Exchange に含まれます)。

ここに画像の説明を入力

4

1 に答える 1

0

EF doesn't currently support using one context with part of the model mapped to one database and part of the model mapped to a different database. You could use two contexts, but then you would need to handle the interactions between the different parts of the model manually. Also, you would need to find an EF provider to get the data out of Outlook, and I'm not aware of one existing.

You're best bet is probably either to mirror the data in SQL Server or to handle the Outlook data separately (not using EF) and have your own code to bring the two models together. This may or may not be feasible depending on what you're going to need to do with the data.

于 2012-10-19T22:55:54.420 に答える