スポンサーリンク

EF7で “Code First Only” のみとしたいいわけがMSDNブログに書かれていたよ

EF7 – What Does “Code First Only” Really Mean – ADO.NET Blog – Site Home – MSDN Blogs.

Entity Framework 7ではEntity Frameworkのモデルファーストや、DBからEDMXへのリバースエンジニアリングが無くなるというか、モデル(EDMX)が無くなり、Code Firstだけとなる。

上リンクはなぜ、EF開発チームはEDMXを捨て、Codeだけにしたのかといういいわけ。

Code First is a bad name

Prior to EF4.1 we supported the Database First and Model First workflows. Both of these use the EF Designer to provide a boxes-and-lines representation of a model that is stored in an xml-based .edmx file. Database First reverse engineers a model from an existing database and Model First generates a database from a model created in the EF Designer.

In EF4.1 we introduced Code First. Understandably, based on the name, most folks think of Code First as defining a model in code and having a database generated from that model. In actual fact, Code First can be used to target an existing database or generate a new one. There is tooling to reverse engineer a Code First model based on an existing database. This tooling originally shipped in the EF Power Tools and then, in EF6.1, was integrated into the same wizard used to create EDMX models.

Another way to sum this up is that rather than a third alternative to Database & Model First, Code First is really an alternative to the EDMX file format. Conceptually, Code First supports both the Database First and Model First workflows.

Confusing… we know. We got the name wrong. Calling it something like “code-based modeling” would have been much clearer.

Code Fistがまずかった。名前はCode baseにするべきだったと。そうですか。氏ねよ。

そもそもEDMXは「それ2000年頃にStorage+とかADO+って言う名前で説明資料で見たよ!」っていう既視感の強い内容でしたし、当時からRailsや他のスキャフォールディングのあるフレームワークと比べてどうしてこうなったという感じが非常に強い感じでしたし、それも人づてに開発がWinFSの開発チーム(という事はStorage+開発チーム…)だった人たちによって行われていると聞いて、EDMXもそのばかでかさ、風呂敷の大きさに対するその中の実際のおまんじゅうのしょぼさに妙に納得したものでした。

是非EF7は根本的に作り直され、モダナイズされた軽量なO/Rマッパとなってほしい物です。

ま、そうなりつつもあり、OSSバンザイって感じですよ。

コメント

タイトルとURLをコピーしました