public void T4GeneratorCSharpTest() { var generator = new T4Generator(); var result = generator.Generate(model); Console.WriteLine(result); }
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)); }
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)); }