public static string PathOutputTransactionScriptApiAppSettings(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApi, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, string.Format("appsettings.json"));
            return(pathOutput);
        }
        public static string PathOutputFilter(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassFilter, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, "FiltersTransaction", tableInfo.ClassName, string.Format("{0}Filter.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "FiltersTransaction", tableInfo.ClassName);
            return(pathOutput);
        }
예제 #3
0
        public static string PathOutputDbContext(Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassDomain);

            pathOutput = Path.Combine(pathBase, "Context", string.Format("DbContext{0}.{1}", configContext.Module, "cs"));
            PathOutputBase.MakeDirectory("Context", pathBase);
            return(pathOutput);
        }
예제 #4
0
        public static string PathOutputApp(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApp);

            pathOutput = Path.Combine(pathBase, "Services", tableInfo.ClassName, string.Format("{0}ServiceBase.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "Services", tableInfo.ClassName);
            return(pathOutput);
        }
예제 #5
0
        public static string PathOutputDtoSpecializedDetail(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassDto);

            pathOutput = Path.Combine(pathBase, "Dto", tableInfo.ClassName, string.Format("{0}DtoDetail.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "Dto", tableInfo.ClassName);
            return(pathOutput);
        }
예제 #6
0
        public static string PathOutputApiPartial(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApi);

            pathOutput = Path.Combine(pathBase, "Controllers", string.Format("{0}Controller.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory("Controllers", pathBase);
            return(pathOutput);
        }
예제 #7
0
        public static string PathOutputAutoMapperProfile(Context configContext, TableInfo tableInfo)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApp);

            pathOutput = Path.Combine(pathBase, "Config", string.Format("DomainToDto{0}.{1}", configContext.Module, "cs"));
            PathOutputBase.MakeDirectory("Config", pathBase);
            return(pathOutput);
        }
        public static string PathOutputTransactionScriptApiHealth(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApi, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, "Controllers", string.Format("healthController.{0}", "cs"));
            PathOutputBase.MakeDirectory("Controllers", pathBase);
            return(pathOutput);
        }
        public static string PathOutputTransactionScriptDtoSpecialized(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassDto, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, "DtoTransaction", tableInfo.ClassName, string.Format("{0}DtoSpecialized.ext.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "DtoTransaction", tableInfo.ClassName);
            return(pathOutput);
        }
        public static string PathOutputTransactionScriptIEntityRepository(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassInfra, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, "Interfaces", tableInfo.ClassName, string.Format("I{0}Repository.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "Interfaces", tableInfo.ClassName);
            return(pathOutput);
        }
예제 #11
0
        public static string PathOutputFilterPartial(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassFilter);
            var fileName   = tableInfo.ClassName;

            pathOutput = Path.Combine(pathBase, "Filters", fileName, string.Format("{0}Filter.{1}", fileName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "Filters", fileName);
            return(pathOutput);
        }
예제 #12
0
        public static string PathOutputMapsPartial(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassDomain);

            pathOutput = Path.Combine(pathBase, "Maps", tableInfo.ClassName, string.Format("{0}Map.{1}", tableInfo.ClassName, "cs"));
            PathOutputBase.MakeDirectory(pathBase, "Maps", tableInfo.ClassName);

            return(pathOutput);
        }
        public static string PathOutputAngular20ComponentAppCustomRouting(Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputAngular, configContext.UsePathProjects);

            pathOutput = pathAppFile(pathBase, "app.custom.routing.ts");
            PathOutputBase.MakeDirectory(pathAppDirectory(pathBase));

            return(pathOutput);
        }
        public static string PathOutputAngular20MainServiceReources(Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputAngular, configContext.UsePathProjects);

            pathOutput = pathComponentDirectory(pathBase, "main.service.resource.ts");
            PathOutputBase.MakeDirectory(pathAppDirectory(pathBase));

            return(pathOutput);
        }
        public static string PathOutputTransactionScriptApiContainerPartial(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var pathBase   = PathOutputBase.PathBase(configContext.OutputClassApi, configContext.UsePathProjects);

            pathOutput = Path.Combine(pathBase, "ConfigTransaction", string.Format("ConfigContainer{0}.ext.{1}", configContext.Module, "cs"));
            PathOutputBase.MakeDirectory("ConfigTransaction", pathBase);

            return(pathOutput);
        }
        public static string PathOutputAngular20ComponentModuleTs(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var className  = tableInfo.ClassName.ToLower();
            var pathBase   = PathOutputBase.PathBase(configContext.OutputAngular, configContext.UsePathProjects);

            pathOutput = pathComponentFile(pathBase, className, "module.ts");
            PathOutputBase.MakeDirectory(pathComponentDirectory(pathBase, className));

            return(pathOutput);
        }
예제 #17
0
        public static string PathOutputAutoMapper(Context configContext)
        {
            var pathOutput = string.Empty;

            var pathBase = PathOutputBase.PathBase(configContext.OutputClassApp);

            pathOutput = Path.Combine(pathBase, "Config", string.Format("AutoMapperConfig{0}.{1}", configContext.Module, "cs"));
            PathOutputBase.MakeDirectory("Config", pathBase);

            return(pathOutput);
        }
예제 #18
0
        public static string PathOutputContainerPartial(Context configContext)
        {
            var pathOutput = string.Empty;

            var pathBase = PathOutputBase.PathBase(configContext.OutputClassApi);

            pathOutput = Path.Combine(pathBase, "Config", string.Format("ConfigContainer{0}.ext.{1}", configContext.Module, "cs"));
            PathOutputBase.MakeDirectory("Config", pathBase);

            return(pathOutput);
        }
        public static string PathOutputAngular20SubComponentPrintCss(TableInfo tableInfo, Context configContext)
        {
            var pathOutput = string.Empty;
            var className  = tableInfo.ClassName.ToLower();

            var pathBase = PathOutputBase.PathBase(configContext.OutputAngular, configContext.UsePathProjects);

            pathOutput = pathSubComponentFile(pathBase, className, "print", "component.css");
            PathOutputBase.MakeDirectory(pathSubComponentDirectory(pathBase, className, "print"));

            return(pathOutput);
        }
        public static string PathOutputAngular20SubComponentEditContainer(TableInfo tableInfo, Context configContext, string extension)
        {
            var pathOutput = string.Empty;
            var className  = tableInfo.ClassName.ToLower();

            var pathBase = PathOutputBase.PathBase(configContext.OutputAngular, configContext.UsePathProjects);

            pathOutput = pathSubComponentFile(pathBase, className, "container-edit", string.Format("component.{0}", extension));
            PathOutputBase.MakeDirectory(pathSubComponentDirectory(pathBase, className, "container-edit"));

            return(pathOutput);
        }
예제 #21
0
        public static void DoMigation(HelperSysObjectsBase sysObject, string originPathRoot, string originNamespace)
        {
            var filesToMigrationsOrigin      = new List <FileInfo>();
            var filesToMigrationsDestination = new List <string>();

            foreach (var ctx in sysObject.Contexts)
            {
                foreach (var item in ctx.TableInfo)
                {
                    var pathBase = PathOutputBase.PathBase(originPathRoot, ctx.UsePathProjects);
                    GetDirectorys(pathBase, filesToMigrationsOrigin, item);
                }
            }

            foreach (var ctx in sysObject.Contexts)
            {
                foreach (var file in filesToMigrationsOrigin)
                {
                    var newFilePath = file.FullName.Replace(originPathRoot, ctx.OutputClassRoot).Replace(originNamespace, ctx.Namespace);
                    filesToMigrationsDestination.Add(newFilePath);
                    PrinstScn.WriteLine("rename file {0} to list destination", file);

                    var pathBase = new FileInfo(newFilePath).DirectoryName;
                    if (!Directory.Exists(pathBase))
                    {
                        Directory.CreateDirectory(pathBase);
                    }

                    File.Copy(file.FullName, newFilePath, true);
                }
            }

            foreach (var item in filesToMigrationsDestination)
            {
                PrinstScn.WriteLine("Final Path : {0}", item);
            }
        }