Default namespace setting

Dec 24, 2009 at 1:00 PM

At this moment the default namespace is a concatenation between the company name and the project. Is it easy to add a new setting "Default namespace"? When the "Default namespace" has a value it is used during generation else the current concantenation solution is used.

We have the situation where we would like a namespace like [Company].[Project].Dal. With the current solution this is not possible.

Dec 24, 2009 at 5:20 PM

Since other are using the code. We would need to come up with a solution that is backward compatible.

We have thought of three options.

1. User the same file templates. But Generate two different dlls with different namespaces. (Not so happy with this one)

2. If the old project currently exists in the solution, Generate as normal. If not then use the DAL namespace.

3. Give the user an option to specify the namespace in the model.

What are your thoughts

Dec 25, 2009 at 8:53 AM

I would prefer option 3 in combination with the current implementation for backward compatibility. So when creating a model you can already specify the company name and the project name. In addition a default namespace can be specified. When generating the code you check if the default namespace is set and use that as namespace prefix. If the default namespace is not specified you can use the current implementation by using the company name and the project name. Hopefully this is possible.

Aug 30, 2010 at 1:47 PM

I'd like to see option #3 as well. You could implement the option the same way you handle facades: the model will use the company name and project unless a custom namespace has been specified.

Dec 2, 2010 at 10:36 PM

You will be able to specify a custom namespace in the next version. The model will have a new property called "DefaultNamespace".

Dec 3, 2010 at 7:16 AM

That's good news. Thanks a lot.

Dec 3, 2010 at 12:04 PM

The new version will be and will be available within the next few days.