IRepositoryTemplate.ttinclude 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <#+
  2. // <copyright file="DalTemplate.tt" company="Yue@China">
  3. // Copyright © Yue. All Rights Reserved.
  4. // </copyright>
  5. public class IRepositoryTemplate : CSharpTemplate
  6. {
  7. private T4ModelInfo _model;
  8. public IRepositoryTemplate(T4ModelInfo model)
  9. {
  10. _model=model;
  11. }
  12. ///<summary>
  13. ///获取 生成的文件名,根据模型名定义
  14. ///</summary>
  15. public string FileName {get {return string.Format("I{0}Repository.gen.cs",_model.Name);}}
  16. public override string TransformText()
  17. {
  18. #>
  19. //------------------------------------------------------------------------------
  20. // <auto-generated>
  21. // 此代码由工具生成。
  22. // 对此文件的更改可能会导致不正确的行为,并且如果
  23. // 重新生成代码,这些更改将会丢失。
  24. // 如存在本生成代码外的新需求,请在相同命名空间下创建同名分部类实现 I<#= _model.Name #>Repository 分部方法。
  25. // </auto-generated>
  26. //
  27. // <copyright file="I<#= _model.Name #>Repository.gen.cs">
  28. // Copyright(c)2013 YUECN.All rights reserved.
  29. // CLR版本: v0.8
  30. // 开发组织:IWB
  31. // 公司网站:www.iwbnet.com
  32. // 所属工程: YZXYH
  33. // 生成时间:<#= DateTime.Now.ToString("yyyy-MM-dd HH:mm") #>
  34. // </copyright>
  35. //------------------------------------------------------------------------------
  36. using YZXYH.Repository.Models;
  37. namespace YZXYH.Repository.Interface
  38. {
  39. public partial interface I<#= _model.Name #>Repository:IBaseRepository<<#= _model.Name #>>
  40. {
  41. }
  42. }
  43. <#+
  44. return this.GenerationEnvironment.ToString();
  45. }
  46. }
  47. #>