The desired functionality could be achieved by modifying the template located in (OpenAccess ORM Install Folder)\dsl(Version of Visual Studio)\CodeGenerationTemplates\CSharp\Includes\Specific.ttinclude
. The subfolder if Visual Studio 2012 is used will be dsl2012
if Visual Studio 2010 is used. The generation of navigational properties will be skipped if the following code is inserted at line 219 of the aforementioned file:
.DomainModel.Bridge.MetaModel.PersistentTypes.Any(p => p.Name == propertyType))
After the model is regenerated with this code template no navigational properties in the generated classes will be available. For example, a category class will not have collection of products and product type will not have a property that will reference the category type.
When modifying code templates it is good approach to follow best practices described in this
Please find the attached file as a modified version of Specific.ttinclude so the generated code using this template wont have navigational properties.
If there are any difficulties using the modified template or if the achieved behavior is not suitable in your scenario do not hesitate to contact us again.
All the best,
the Telerik team