codefluent

procedureFormat in project element is having no affect


I would like all stored procedures generated from the model to have the name prefixed with "cf_". I added procedureFormat="cf_{0}" to the project element. However, it did not work. Is there something else I'm missing?

Below is the project element:

<cf:project defaultNamespace="DemoNaming" xmlns:cf="http://www.softfluent.com/codefluent/2005/1" xmlns:cfx="http://www.softfluent.com/codefluent/modeler/2008/1" xmlns:cfps="http://www.softfluent.com/codefluent/producers.sqlserver/2005/1" xmlns:cfom="http://www.softfluent.com/codefluent/producers.model/2005/1" xmlns:cfasp="http://www.softfluent.com/codefluent/producers.aspnet/2011/1" defaultConnectionString="Database=DemoNaming;Server=.\DEV_SQL_1;Integrated Security=true" createDefaultMethodForms="true" createDefaultApplication="false" createDefaultHints="false" procedureFormat="cf_{0}">

Solution

  • You forgot to define the naming convention to use, so CodeFluent Entities uses the BaseNamingConvention. From the documentation, you must set the namingConventionTypeName attribute to CodeFluent.Model.Naming.FormatNamingConvention, CodeFluent.Model:

    FormatNamingConvention derives from the BaseNamingConvention class and adds format capabilities and is used as the base class to all other out-of-the-box naming conventions.

    <cf:project
        namingConventionTypeName="CodeFluent.Model.Naming.FormatNamingConvention, CodeFluent.Model"
        procedureFormat="cf_{0}">
        (...)
     </cf:project>