예제 #1
0
        public void Run()
        {
            var allTables = new ToolsService().GetAllTables();

            var solutionName = "Meiam.System";

            foreach (var table in allTables)
            {
                Console.Write($"生成[{ table }]表 模型: ");
                Console.WriteLine(new ToolsService().CreateModels($"..\\..\\..\\..\\{ solutionName }.Model\\Entity", solutionName, table, ""));
                Console.Write($"生成[{ table }]表 服务: ");
                Console.WriteLine(new ToolsService().CreateServices($"..\\..\\..\\..\\{ solutionName }.Interfaces\\Service", solutionName, table));
                Console.Write($"生成[{ table }]表 接口: ");
                Console.WriteLine(new ToolsService().CreateIServices($"..\\..\\..\\..\\{ solutionName }.Interfaces\\IService", solutionName, table));
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            var allTables = new ToolsService().GetAllTables();

            foreach (var table in allTables)
            {
                Console.Write($"生成[{ table }]表 模型: ");
                Console.WriteLine(new ToolsService().CreateModels("..\\..\\..\\..\\Meiam.System.Model\\Entity", "Meiam.System.Model", table, ""));
                Console.Write($"生成[{ table }]表 服务: ");
                Console.WriteLine(new ToolsService().CreateServices("..\\..\\..\\..\\Meiam.System.Interfaces\\Service", "Meiam.System.Interfaces", table));
                Console.Write($"生成[{ table }]表 接口: ");
                Console.WriteLine(new ToolsService().CreateIServices("..\\..\\..\\..\\Meiam.System.Interfaces\\IService", "Meiam.System.Interfaces", table));
            }

            Console.Write($"生成DbContext: ");
            Console.WriteLine(new ToolsService().CreateDbContext("..\\..\\..\\..\\Meiam.System.Core\\DbContext.cs", "Meiam.System.Core"));
            Console.ReadKey();
        }