Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
Dennis,

For either L2S or EF, the only reason you would needed a mapper is if you don't want to reference the System.Data.Entity assembly in your UI project.  There are pros and cons to this. 

Pros
  • No mapping
  • business object models are generated for you by ORM

Cons

  • System.Data.Entity - some teams don't want this in their UI

  • mapping is necessary

Alternative

If you use the DbContext for EF you can use common POCO's and then no mapping is necessary.

You can watch a video where I build an application with this pattern from scratch.  http://www.codegencentral.net/s/59

It's a thought.

King Wilder


King Wilder, Jun 11, 2012
Reply 2

LinqToSQL will give you a fast way to get started with an ORM but is limited to 1 to 1 mappings.

You should plan to map the CRUD objects into domain objects and pass those objects around in your application.

Following that logic, subsequent investigations will lead you to the Entity Framework as it is more flexible and so gives you more options including support for mapping your CRUD interface into a domain model.

Read this:
http://msdn.microsoft.com/en-us/library/cc161164.aspx

Avoid binding your UI to your database.

The benefits of doing so far out weigh the costs. 
Niall Finlay, Jun 11, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas