Commits

gb2013  committed 7f6e695

接口模板中添加获取集合个数的方法;

  • Participants
  • Parent commits 5142828

Comments (0)

Files changed (3)

File CodeUnion.CodeGenerator/App.config

 <configuration>
   <connectionStrings>
     <!--<add name="connectionString" connectionString="Provider=SQLOLEDB; Data Source=10.10.66.150; Initial Catalog=fms; Persist Security Info=False; User ID=testwrite; Password=654321;" providerName="fms"/>-->
-    <add name="connectionString" connectionString="provider=sqloledb;data source=61.160.200.251,3421;User ID=glgtswriter;pwd=Guo4^Li5#Gong6;Initial Catalog=AmrEn" providerName="AmrEn"/>
-    <!--<add name="connectionString" connectionString="Provider=SQLOLEDB; Data Source=(local); Initial Catalog=Management; Persist Security Info=False; User ID=test; Password=test;" providerName="Management"/>-->
-
+    <!--<add name="connectionString" connectionString="provider=sqloledb;data source=61.160.200.251,3421;User ID=glgtswriter;pwd=Guo4^Li5#Gong6;Initial Catalog=AmrEn" providerName="AmrEn"/>-->
+    <add name="connectionString" connectionString="provider=sqloledb;data source=(local);User ID=sa;pwd=as;Initial Catalog=AmrEn" providerName="AmrEn" />
   </connectionStrings>
 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>

File CodeUnion.CodeGenerator/CodeUnion.CodeGenerator.csproj

     </Compile>
     <None Include="App.config">
       <SubType>Designer</SubType>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>

File CodeUnion.CodeGenerator/Templates/3.5/IModelService.cs.vm

 		/// <returns>$table.Description集合</returns>
 		IList<$table.Alias> Get${table.Alias}s(${table.Alias}QP ${table.CamelAlias}Qp);
 
+		
+		/// <summary>
+		/// 获取指定查询条件下$table.Description集合记录数
+		/// </summary>
+		/// <param name="${table.CamelAlias}Qp">$table.Description</param>
+		/// <returns>$table.Description集合</returns>
+		int Get${table.Alias}sCount(${table.Alias}QP ${table.CamelAlias}Qp);
+
 		/// <summary>
 		/// 移除$table.Description
 		/// </summary>