0

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: An XML/XSD representation of the data structure.

Kevin
  • 1
  • 1
  • I'm also curious. You can generate xml mappings for LINQ to SQL with sqlmetal.exe, but I'm not sure about EF. – jrummell Mar 24 '11 at 12:20

1 Answers1

0

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

Magnus Backeus
  • 2,242
  • 17
  • 24