Example #1
0
        static void Main(string[] args)
        {
            var list = new List <string>
            {
                "DwgPlatformConfig",
                "DwgMenu",
                "DwgInfo",
                "DwgFileFetchScheduleRecord",
                "DwgFileAnalyticScheduleRecord"
            };
            var postFixs = new List <string>
            {
                "Entity",
                "Model"
            };

            new ModelBuilderFactory()
            .SetConnectionString(FileHelperExtension.ReadSingleLineFromFile("C:\\jzcadstr.txt"))
            .SetNameSpace("JZFZ.Platform.Dwginfo")
            .SetTableNames(list)
            .SetPostFixs(postFixs)
            .Build();

            string dir = AppDomain.CurrentDomain.BaseDirectory;

            System.Diagnostics.Process.Start("explorer.exe", dir);
        }
        private static void CreateFile(string filePath, string fileName, string content)
        {
            var basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filePath);

            DirectoryHelper.Createdir(basePath);

            var fileFullPath = Path.Combine(basePath, fileName);

            if (File.Exists(fileFullPath))
            {
                File.Delete(fileFullPath);
            }

            FileHelperExtension.AppendToFile(fileFullPath, content);
        }