This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Here's a small request that'd be a "nice-to-have"... At the moment, Lightspeed will generate DTOs within the namespace {ModelNamespace}.Contracts.Data (ie: relative to the Model namespace}. Would it be possible to provide an override that allows us to specify the absolute DTO namespace (ie: a property on the design surface alignside the model namespace)... Eg: I'd like to be able to lay out my domain model project structure like so... MyApp.Domain.Contracts /* Interface exposed to the rest of the application */ Cheers, |
|
|
Hi Greg, You could customize this by editing the code generation templates (under C:\Program Files\Mindscape\LightSpeed\Tools\Designer\Templates\[language] by default). For what you have described above you could use the Model namespace property as your "root", so specify it as MyApp.Domain, and then update base.vm to add the following: #if ($Context.IncludeLinq || $ProcedureHelper.IsNonEmpty($Procedures)) namespace ${Context.namespace}.Contracts { } #end then remove the 3 duplicated lines from the above section and update the namespace declaration near the top of the file to be namespace ${Context.namespace}.Entities
Jeremy |
|
|
Hi Jeremy, I did wonder about updating the codegen templates... but my preference has been to stay away from that, as they're not tied to a particular solution (and hence version control) and I can imagine it being something I'd forget to merge during a future lightspeed upgrade...
Have you guys ever considered finding a way to have per solution datagen templates? Now that would be great...
Cheers, |
|
|
[quote user="gwhite"]Have you guys ever considered finding a way to have per solution datagen templates?[/quote] Sure have. *grin* |
|
|
Fantastic!!!
Thanks guys |
|