views:

161

answers:

2

I have seen this issue twice now and want to see what a best practice is for resolving this naming convention. Suppose I have an ORM (Linq to SQL in this case) and I map a table called User. Then I create my POCO called User also. Although the mapped table exists in something like

MyApp.Data.User

and the POCO resides in something like

MyApp.Objects.User

I realize one can do a full namespace identification for either throughout the code, but do you have a sensible naming convention so you can tell easily which is the table mapping and which is the POCO? Thanks!

A: 

I would name the mapping UserMapping.

Because that's what it is.

Chris Holmes
+1  A: 

I use to call the Linq2SQL objects DbUser and so on.
This makes it very easy to scan through the code and see which is which, and since the L2S data objects are only accessible in the DataTier, the wierd naming is less of a problem.

Lars Mæhlum