public void T4GeneratorCSharpTest()
        {
            var generator = new T4Generator();

            var result = generator.Generate(model);

            Console.WriteLine(result);
        }
예제 #2
0
        protected override string Generate(string modelContent, string namspaceName)
        {
            var model     = JsonModelReader.Read(modelContent);
            var fullModel = new Model
            {
                Entities      = model,
                NamespaceName = namspaceName
            };
            var generator = new T4Generator();

            return(generator.Generate(fullModel));
        }
예제 #3
0
        protected override byte[] GenerateCode(string inputFileName, string inputFileContent)
        {
            var entities = JsonModelReader.Read(inputFileContent);
            var model    = new Model
            {
                Entities      = entities,
                NamespaceName = FileNamespace
            };

            var generator  = new T4Generator();
            var outContent = generator.Generate(model);

            return(Encoding.UTF8.GetBytes(outContent));
        }