68 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
| <#@ template debug="false" hostspecific="true" language="C#" #>
 | |
| <#@ output extension=".cs" #>
 | |
| <#@ assembly name="System.Core.dll" #>
 | |
| <#@ assembly name="System.Data.dll" #>
 | |
| <#@ assembly name="System.Data.DataSetExtensions.dll" #>
 | |
| <#@ assembly name="System.Xml.dll" #>
 | |
| <#@ import namespace="System" #>
 | |
| <#@ import namespace="System.Xml" #>
 | |
| <#@ import namespace="System.Linq" #>
 | |
| <#@ import namespace="System.Data" #>
 | |
| <#@ import namespace="System.Data.SqlClient" #>
 | |
| <#@ import namespace="System.Collections.Generic" #>
 | |
| <#@ import namespace="System.IO" #>
 | |
| <#@ include file="$(ProjectDir)DbHelper.ttinclude"  #>
 | |
| <#@ include file="$(ProjectDir)ModelAuto.ttinclude"	#>
 | |
| <# var manager = new Manager(Host, GenerationEnvironment, true); #>
 | |
| 
 | |
| 
 | |
| <# 
 | |
| 	var OutputPath1 =Path.GetDirectoryName(Host.TemplateFile+"..");
 | |
| 	OutputPath1=Path.Combine(OutputPath1,"IRepositories_New");
 | |
| 	if (!Directory.Exists(OutputPath1))
 | |
| 	{
 | |
| 	    Directory.CreateDirectory(OutputPath1);
 | |
| 	}
 | |
| #>
 | |
| 
 | |
| 
 | |
| <# foreach (var item in DbHelper.GetDbTablesNew(config.ConnectionString, config.DbDatabase,config.TableName))
 | |
|    {
 | |
| 		 var tableName=item.ToString();
 | |
| 		manager.StartBlock("I"+tableName+"Repository"+".cs",OutputPath1);//文件名
 | |
| #>
 | |
| //--------------------------------------------------------------------
 | |
| //     此代码由T4模板自动生成  byzhouhang 20210918
 | |
| //	   生成时间 <#=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")#> 
 | |
| //     使用泛型仓储注册,现在不需要这个文件了,作为学习例子
 | |
| //     对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
 | |
| //--------------------------------------------------------------------
 | |
| using IRaCIS.Core.Domain.IRepository;
 | |
| using IRaCIS.Core.Domain.Models;
 | |
| namespace IRaCIS.Core.Domain.IRepository
 | |
| {	
 | |
| 	/// <summary>
 | |
| 	/// I<#=tableName#>Repository
 | |
| 	/// </summary>	
 | |
| 	public interface I<#=tableName#>Repository : IRepository<<#=tableName#>>
 | |
|     {
 | |
| 
 | |
|        
 | |
|     }
 | |
| } 
 | |
| <#
 | |
|    manager.EndBlock(); 
 | |
|    }
 | |
|   manager.Process(true);
 | |
|  #>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 	
 | |
| 
 | |
| 
 | |
| 
 |