无法为生成的视图

时间:2017-12-14 15:33:39

标签: codefluent

我希望能够添加前缀" cf _"到所有存储过程和视图。我使用存储过程,但相同的方法不适用于视图。请参阅屏幕截图,了解我如何分配自定义前缀。

enter image description here

虽然我包含了XML文件,但我更喜欢使用属性页而不是直接编辑XML。

<cf:project defaultNamespace="DemoCustomPrefix" 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" defaultTargetFramework="4.0" defaultConnectionString="Database=DemoCustomPrefix;Server=.\SQLExpress;Integrated Security=true" persistenceSaveProcedureFormat="cf_{0}_Save" persistenceLoadProcedureFormat="cf_{0}_{1}" persistenceSearchProcedureFormat="cf_{0}_{1}" persistenceDeleteProcedureFormat="cf_{0}_{1}" persistenceRawProcedureFormat="cf_{0}_{1}" viewFormat="cf_{0}" procedureFormat="cf_{0}" createDefaultMethodForms="true" createDefaultApplication="false" createDefaultHints="false">
  <cf:import path="Default.Surface.cfp" />
  <cf:producer name="SQL Server Producer" typeName="CodeFluent.Producers.SqlServer.SqlServerProducer, CodeFluent.Producers.SqlServer">
    <cf:configuration connectionString="Database=DemoCustomPrefix;Server=.\SQLExpress;Integrated Security=true" produceViews="true" targetVersion="Sql2008" targetDirectory="..\DemoCustomPrefix.Persistence" cfx:targetProjectLayout="UpdateItems, DontRemove" cfx:targetProject="..\DemoCustomPrefix.Persistence\DemoCustomPrefix.Persistence.dbproj" />
  </cf:producer>
  <cf:producer name="BOM Producer" typeName="CodeFluent.Producers.CodeDom.CodeDomProducer, CodeFluent.Producers.CodeDom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1bb6d7cccf1045ec">
    <cf:configuration compileWithVisualStudio="true" targetDirectory="..\DemoCustomPrefix" cfx:targetProject="..\DemoCustomPrefix\DemoCustomPrefix.csproj" />
  </cf:producer>
  <cf:producer name="ASP.NET WebForms Producer" typeName="CodeFluent.Producers.UI.AspNetProducer, CodeFluent.Producers.UI">
    <cf:configuration categoryPath="UI\AspNetWebForms" targetDirectory="..\DemoCustomPrefix.Web" cfx:targetProject="..\DemoCustomPrefix.Web\DemoCustomPrefix.Web.csproj" />
  </cf:producer>
  <cf:entity name="Widget" namespace="DemoCustomPrefix">
    <cf:property name="Id" key="true" />
    <cf:property name="Name" />
  </cf:entity>
</cf:project>

1 个答案:

答案 0 :(得分:1)

想出来。只需选择&#34; Custom Formats&#34;根据命名惯例。

enter image description here