zoukankan      html  css  js  c++  java
  • T4 simple template

    下载

    http://t4-editor.tangible-engineering.com/Download_T4Editor_Plus_ModelingTools.html

    添加新建项Simple T4 Template,生成IBLL,注意不是添加运行时文本模板

    <#@ template language="C#" debug="false" hostspecific="true"#>
    <#@ include file="EF.Utility.CS.ttinclude"#>
    <#@ output extension=".cs"#> 
     <#
    CodeGenerationTools code = new CodeGenerationTools(this);
    MetadataLoader loader = new MetadataLoader(this);
    CodeRegion region = new CodeRegion(this, 1);
    MetadataTools ef = new MetadataTools(this);
    
    string inputFile = @"..ModelModel.edmx";
    
    EdmItemCollection ItemCollection = loader.CreateEdmItemCollection(inputFile);
    string namespaceName = code.VsNamespaceSuggestion();
    
    EntityFrameworkTemplateFileManager fileManager = EntityFrameworkTemplateFileManager.Create(this);
    
    #>
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    
    namespace IBLL
    {
    <#
    
    // Emit Entity Types
    foreach (EntityType entity in ItemCollection.GetItems<EntityType>().OrderBy(e => e.Name))
    {
        //fileManager.StartNewFile(entity.Name + "RepositoryExt.cs");
        //BeginNamespace(namespaceName, code);
        
    #>
        public partial interface I<#=entity.Name#>BLL : IBaseBLL<Model.<#=entity.Name#>>
        {
        
        }
    
    <#}#>
    
    }
  • 相关阅读:
    HBase分布式集群搭建过程
    HBase基础知识
    HBase伪分布搭建
    搭建ZooKeeper集群环境
    hadoop集群环境搭建-hadoop之伪分布搭建环境
    乱序数组找出前面的都比他小后面的都比他大的数
    sikuli简介
    ZooKeeper 应用场景
    svmrank原理
    Latex汇总
  • 原文地址:https://www.cnblogs.com/tgdjw/p/4673204.html
Copyright © 2011-2022 走看看