| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <#+
- // <copyright file="DalTemplate.tt" company="Yue@China">
- // Copyright © Yue. All Rights Reserved.
- // </copyright>
- public class RepositoryTemplate : CSharpTemplate
- {
- private T4ModelInfo _model;
- public RepositoryTemplate(T4ModelInfo model)
- {
- _model=model;
- }
- ///<summary>
- ///获取 生成的文件名,根据模型名定义
- ///</summary>
- public string FileName {get {return string.Format("{0}Repository.gen.cs",_model.Name);}}
- public override string TransformText()
- {
- #>
- //------------------------------------------------------------------------------
- // <auto-generated>
- // 此代码由工具生成。
- // 对此文件的更改可能会导致不正确的行为,并且如果
- // 重新生成代码,这些更改将会丢失。
- // 如存在本生成代码外的新需求,请在相同命名空间下创建同名分部类实现 <#= _model.Name #>Repository 分部方法。
- // </auto-generated>
- //
- // <copyright file="<#= _model.Name #>Repository.gen.cs">
- // Copyright(c)2013 YUECN.All rights reserved.
- // CLR版本: v0.8
- // 开发组织:IWB
- // 公司网站:www.iwbnet.com
- // 所属工程: YZXYH
- // 生成时间:<#= DateTime.Now.ToString("yyyy-MM-dd HH:mm") #>
- // </copyright>
- //------------------------------------------------------------------------------
- using YZXYH.Repository.Models;
- using YZXYH.Repository.Interface;
- namespace YZXYH.Repository
- {
- public partial class <#= _model.Name #>Repository:BaseRepository<<#= _model.Name #>>,I<#= _model.Name #>Repository
- {
- public <#= _model.Name #>Repository(Yzxyh2017Context context) : base(context)
- {
- }
- }
- }
- <#+
- return this.GenerationEnvironment.ToString();
- }
- }
- #>
|