views:

120

answers:

1

Hi, im building a generic articles framework and my namespace names are clashing with my entities:

Namespace: MyCompany.Articles.Modules

Class: Articles, Article

Any suggestions to how this can be avoided? According to MS I should use the following format: <Company>.(<Product>|<Technology>)[.<Feature>][.<Subnamespace>].

Thanks.

+5  A: 

A simple solution is to rename your Articles class to ArticleCollection, assuming that class is a collection of Article instances.

This convention is consistent with the .NET Framework and is easy to read.


Since the class is being generated automatically a manual rename is not the best solution.

You can change the namespace to something more broader:

[MyCompany].[MyProduct].Dao

or if it spans all the products in the company:

[MyCompany].Common.Dao

where Dao means Data Access Objects.

João Angelo
That will be my assumption too :P
o.k.w
Hi thanks. The Articles class is generated in .NetTiers automatically using the db table named "Articles" so it seems to be easier to change the namespace of the Modules project. The Modules project is using the auto-generated projects from .NetTiers.
Anders Vindberg
The idea is to call the Articles system something unique other than just Articles - give it a product name. I can follow that. Cheers.
Anders Vindberg