いくつかの検索を実行しましたが、この問題に対する回答が見つかりませんでした。
さて、私の MVC 3 アーキテクチャは次のようになります。
- Project.EDM (contains only the entity framework edmx file and its .tt and .cs entity classes)
- Project.DAL (contains IXxxRepositiory and XxxRepository where CRUD is performed on the entity classes)
- Project.Web (the MVC3 project. Controllers transfer data from ViewModels into entity models and call the CRUD functions in the DAL repositories.)
他のアプリケーションから CRUD 操作を呼び出すことができるためWebApi
、 inは非常に魅力的です。MVC4
私たちは皆、このアイデアが大好きです。
しかし、私が見つけた既存の例では、MVC4 プロジェクト内に CRUD 操作が含まれていApiController
ます。これらの操作を別の DAL プロジェクトに入れることに慣れています。推奨される選択は何ですか? 個別の DAL クラスを引き続き使用できますか? 専門家はどのようにアーキテクチャを設計しますか?
有益なアドバイスをありがとうございました。