Ejemplo n.º 1
0
        public void Add(IRelationAdditionOptions options, string domainFolder, string templateFileName)
        {
            string filePath = GetFilePath(options, domainFolder, templateFileName);
            string fileData = UpdateFileData(options, filePath);

            fileData = ImportStatements.Add(fileData, $"{options.EntityNamePluralFrom}Module",
                                            $"src/app/model/{StringConverter.PascalToKebabCase(options.DomainFrom)}" +
                                            $"/{StringConverter.PascalToKebabCase(options.EntityNamePluralFrom)}" +
                                            $"/{StringConverter.PascalToKebabCase(options.EntityNamePluralFrom)}.module");

            TypescriptClassWriter.Write(filePath, fileData);
        }
Ejemplo n.º 2
0
        public void Add(IRelationAdditionOptions options, string domainFolder, string templateFileName)
        {
            string filePath = GetFilePath(options, domainFolder, templateFileName);
            string fileData = UpdateFileData(options, filePath);

            fileData = ImportStatements.Add(fileData, "MatTableDataSource", "@angular/material/table");
            fileData = ImportStatements.Add(fileData, $"I{options.EntityNameTo}",
                                            $"src/app/model/{StringConverter.PascalToKebabCase(options.DomainTo)}" +
                                            $"/{StringConverter.PascalToKebabCase(options.EntityNamePluralTo)}" +
                                            $"/dtos/i-{StringConverter.PascalToKebabCase(options.EntityNameTo)}");

            TypescriptClassWriter.Write(filePath, fileData);
        }