开发者

how to automatic generate domain model and XML map by use entity framework tool?

开发者 https://www.devze.com 2023-02-06 12:13 出处:网络
I have a data model(.edmx file),how can I use this file automatic generate a Domain model and a XML map by using entity framework tool?

I have a data model(.edmx file), how can I use this file automatic generate a Domain model and a XML map by using entity framework tool?

Domain Model: A domain model for use by a data access layer component in a client application.

XML MAP: 开发者_Go百科 An XML/XSD representation of the data structure.


I'm working in such a project right now, and I strongly suggest you reconsider this approach with EF4. Use EF 4.1 with Code First Approach.

After a while you find yourself locked up and multi-layer data showelling where domain logic leaks out to GUI or application service layer (a.k.a. Anemic Domain model --> It's a anti-pattern for me).

You will have domain entities that are a reflection of your database ERD diagram and you have no chance in injecting behavior, since they are autogenerated by this custom tool.

Please consider this option. You will benefit from it, even though it will take time to "code" your entity relationships.

/Best Regards Magnus

0

精彩评论

暂无评论...
验证码 换一张
取 消