Olivier Muhring

Olivier Muhring

  • NA
  • 150
  • 8.7k

I'm currently working on a small mvc project. On itself nothing special, I'm a big supporter of the ...

Jun 15 2012 11:10 AM
I have datalayer which uses EF 4.1 to communicate with a database. On top op this I've added a datamodel-project, which basically translates between EF's POCO-classes and the DTO-objects I use further along in the application (business and UI)

I'm doing this straightforward, manually mapping and creating my objects as I go along.  I've used this approach, with great success, in several other projects. In my current project however, a colleague has made several objections. She thinks working my way would in essence mean throwing away a lot of the power of the Entity Framework. To circumvent this, she wants to write a wrapper around my POCO or my DTO classes (not sure which) and use that wrapper to write a convertor, so as to automatically map my POCO classes to their DTO counterparts and so  on.
I personally believe this to be overkill, but I do understand her objections.

In some fields of C# I'm still somewhat of a novice so far, so I'm at a loss at what to do now. How you undertake writing a wrapper (what is wrapper anyway) around a class, and then how do you write a converter?

Answers (2)