コード例 #1
0
 public static AspNetCoreProject Select(this AspNetCoreProject project, string pattern, Action <AspNetCoreProjectSettings> action = null)
 => project.Selection(pattern, action);
コード例 #2
0
 public static string GetDataLayerRepositoriesNamespace(this AspNetCoreProject project)
 => string.Join(".", project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProject.Name), project.EntityFrameworkCoreProjectNamespaces.DataLayer, project.EntityFrameworkCoreProjectNamespaces.Repositories);
コード例 #3
0
 public static ProjectSelection <AspNetCoreProjectSettings> GlobalSelection(this AspNetCoreProject project)
 => project.Selections.FirstOrDefault(item => item.IsGlobal);
コード例 #4
0
 public static string GetEntityLayerNamespace(this AspNetCoreProject project)
 => string.Join(".", project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProject.Name), project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProjectNamespaces.EntityLayer));
コード例 #5
0
 public static string GetEntityLayerNamespace(this AspNetCoreProject project, string ns)
 => string.IsNullOrEmpty(ns) ? GetEntityLayerNamespace(project) : string.Join(".", project.EntityFrameworkCoreProject.Name, project.EntityFrameworkCoreProjectNamespaces.EntityLayer, ns);
コード例 #6
0
 public static string GetRequestName(this AspNetCoreProject project, ITable table)
 => string.Format("{0}Request", project.EntityFrameworkCoreProject.GetEntityName(table));
コード例 #7
0
 public static string GetRequestExtensionName(this AspNetCoreProject project, ITable table)
 => string.Format("{0}Extensions", project.GetRequestName(table));
コード例 #8
0
 public static string GetRequestsNamespace(this AspNetCoreProject project)
 => string.Format("{0}.{1}", project.Name, project.AspNetCoreProjectNamespaces.Requests);
コード例 #9
0
 public static string GetControllerDeleteAsyncMethodName(this AspNetCoreProject project, ITable table)
 => string.Format("{0}{1}{2}", "Delete", project.EntityFrameworkCoreProject.GetEntityName(table), "Async");
コード例 #10
0
 public static string GetControllerGetAllAsyncMethodName(this AspNetCoreProject project, ITable table)
 => string.Format("{0}{1}{2}", "Get", project.EntityFrameworkCoreProject.GetPluralName(table), "Async");
コード例 #11
0
 internal static void ScaffoldResponsesExtensions(this AspNetCoreProject project)
 {
     CSharpClassBuilder.CreateFiles(project.OutputDirectory, project.AspNetCoreProjectNamespaces.Responses, project.GlobalSelection().Settings.ForceOverwrite, project.GetResponsesExtensionsClassDefinition());
 }
 internal static void ScaffoldResponsesExtensions(this AspNetCoreProject project)
 {
     project.Scaffold(project.GetResponsesExtensionsClassDefinition(), project.OutputDirectory, project.AspNetCoreProjectNamespaces.Responses);
 }
コード例 #13
0
 public static string GetDataLayerRepositoriesNamespace(this AspNetCoreProject project)
 => string.Join(".", namingConvention.GetClassName(project.Name), project.Namespaces.DataLayer, project.Namespaces.Repositories);
コード例 #14
0
 public static string GetEntityLayerNamespace(this AspNetCoreProject project)
 => string.Join(".", namingConvention.GetClassName(project.Name), namingConvention.GetNamespace(project.Namespaces.EntityLayer));
コード例 #15
0
 public static string GetRequestModelsNamespace(this AspNetCoreProject project)
 => string.Format("{0}.{1}", project.Name, "RequestModels");
コード例 #16
0
        internal static void ScaffoldRequestModelsExtensions(this AspNetCoreProject project)
        {
            var classDefinition = project.GetRequestModelExtensionsClassDefinition();

            CSharpClassBuilder.CreateFiles(project.OutputDirectory, "RequestModels", project.GlobalSelection().Settings.ForceOverwrite, classDefinition);
        }