public static AspNetCoreProject Select(this AspNetCoreProject project, string pattern, Action <AspNetCoreProjectSettings> action = null) => project.Selection(pattern, action);
public static string GetDataLayerRepositoriesNamespace(this AspNetCoreProject project) => string.Join(".", project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProject.Name), project.EntityFrameworkCoreProjectNamespaces.DataLayer, project.EntityFrameworkCoreProjectNamespaces.Repositories);
public static ProjectSelection <AspNetCoreProjectSettings> GlobalSelection(this AspNetCoreProject project) => project.Selections.FirstOrDefault(item => item.IsGlobal);
public static string GetEntityLayerNamespace(this AspNetCoreProject project) => string.Join(".", project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProject.Name), project.CodeNamingConvention.GetNamespace(project.EntityFrameworkCoreProjectNamespaces.EntityLayer));
public static string GetEntityLayerNamespace(this AspNetCoreProject project, string ns) => string.IsNullOrEmpty(ns) ? GetEntityLayerNamespace(project) : string.Join(".", project.EntityFrameworkCoreProject.Name, project.EntityFrameworkCoreProjectNamespaces.EntityLayer, ns);
public static string GetRequestName(this AspNetCoreProject project, ITable table) => string.Format("{0}Request", project.EntityFrameworkCoreProject.GetEntityName(table));
public static string GetRequestExtensionName(this AspNetCoreProject project, ITable table) => string.Format("{0}Extensions", project.GetRequestName(table));
public static string GetRequestsNamespace(this AspNetCoreProject project) => string.Format("{0}.{1}", project.Name, project.AspNetCoreProjectNamespaces.Requests);
public static string GetControllerDeleteAsyncMethodName(this AspNetCoreProject project, ITable table) => string.Format("{0}{1}{2}", "Delete", project.EntityFrameworkCoreProject.GetEntityName(table), "Async");
public static string GetControllerGetAllAsyncMethodName(this AspNetCoreProject project, ITable table) => string.Format("{0}{1}{2}", "Get", project.EntityFrameworkCoreProject.GetPluralName(table), "Async");
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); }
public static string GetDataLayerRepositoriesNamespace(this AspNetCoreProject project) => string.Join(".", namingConvention.GetClassName(project.Name), project.Namespaces.DataLayer, project.Namespaces.Repositories);
public static string GetEntityLayerNamespace(this AspNetCoreProject project) => string.Join(".", namingConvention.GetClassName(project.Name), namingConvention.GetNamespace(project.Namespaces.EntityLayer));
public static string GetRequestModelsNamespace(this AspNetCoreProject project) => string.Format("{0}.{1}", project.Name, "RequestModels");
internal static void ScaffoldRequestModelsExtensions(this AspNetCoreProject project) { var classDefinition = project.GetRequestModelExtensionsClassDefinition(); CSharpClassBuilder.CreateFiles(project.OutputDirectory, "RequestModels", project.GlobalSelection().Settings.ForceOverwrite, classDefinition); }