private static void RunEntityBuilders(string solutionDirectory, string srcDirectory, string testDirectory, AddEntityTemplate template, IFileSystem fileSystem) { var projectBaseName = template.SolutionName; var useSoftDelete = Utilities.ProjectUsesSoftDelete(srcDirectory, projectBaseName); //entities EntityScaffolding.ScaffoldEntities(solutionDirectory, srcDirectory, testDirectory, projectBaseName, template.Entities, template.DbContextName, template.AddSwaggerComments, useSoftDelete, fileSystem); SeederModifier.AddSeeders(srcDirectory, template.Entities, template.DbContextName, projectBaseName); DbContextModifier.AddDbSet(srcDirectory, template.Entities, template.DbContextName, projectBaseName); }
private static void RunEntityBuilders(string srcDirectory, string testDirectory, AddEntityTemplate template, IFileSystem fileSystem, Verbosity verbosity) { //entities EntityScaffolding.ScaffoldEntities(srcDirectory, testDirectory, template.SolutionName, template.Entities, template.DbContextName, template.AddSwaggerComments, template.AuthorizationSettings.Policies, fileSystem, verbosity); //seeders & dbsets InfrastructureServiceRegistrationModifier.AddPolicies(srcDirectory, template.AuthorizationSettings.Policies, template.SolutionName); SeederModifier.AddSeeders(srcDirectory, template.Entities, template.DbContextName, template.SolutionName); DbContextModifier.AddDbSet(srcDirectory, template.Entities, template.DbContextName, template.SolutionName); ApiRouteModifier.AddRoutes(testDirectory, template.Entities, template.SolutionName); }
private static void RunEntityBuilders(string srcDirectory, string testDirectory, AddEntityTemplate template, IFileSystem fileSystem) { //entities EntityScaffolding.ScaffoldEntities(srcDirectory, testDirectory, template.SolutionName, template.Entities, template.DbContextName, template.AddSwaggerComments, fileSystem); //TODO move inside scaffoldentites? foreach (var feature in template.Entities.SelectMany(entity => entity.Features)) { InfrastructureServiceRegistrationModifier.AddPolicies(srcDirectory, feature.Policies, template.SolutionName); SwaggerServiceRegistrationModifier.AddPolicies(srcDirectory, feature.Policies, template.SolutionName); } SeederModifier.AddSeeders(srcDirectory, template.Entities, template.DbContextName, template.SolutionName); DbContextModifier.AddDbSet(srcDirectory, template.Entities, template.DbContextName, template.SolutionName); }