312
This commit is contained in:
parent
ce978bf0c7
commit
a8ad69ffbe
|
|
@ -30,13 +30,15 @@ public class PathResolver : IScopedDependency
|
||||||
|
|
||||||
var rootPath = _environment.ContentRootPath
|
var rootPath = _environment.ContentRootPath
|
||||||
.Replace("\\" + _environment.ApplicationName, "");
|
.Replace("\\" + _environment.ApplicationName, "");
|
||||||
|
var webPath = Path.GetDirectoryName(Path.GetDirectoryName(_environment.ContentRootPath))
|
||||||
|
.Replace("\\" + _environment.ApplicationName, "");
|
||||||
var entityName = GetEntityName(tableName, config);
|
var entityName = GetEntityName(tableName, config);
|
||||||
var entityNamePlural = config.UsesPluralPath ? entityName + "s" : entityName;
|
var entityNamePlural = config.UsesPluralPath ? entityName + "s" : entityName;
|
||||||
var tableNameLower = string.IsNullOrWhiteSpace(tableName) ? string.Empty : tableName.ToLower();
|
var tableNameLower = string.IsNullOrWhiteSpace(tableName) ? string.Empty : tableName.ToLower();
|
||||||
|
|
||||||
return template
|
return template
|
||||||
.Replace("{RootPath}", rootPath)
|
.Replace("{RootPath}", rootPath)
|
||||||
|
.Replace("{WebPath}", webPath)
|
||||||
.Replace("{AppPath}", _environment.ContentRootPath)
|
.Replace("{AppPath}", _environment.ContentRootPath)
|
||||||
.Replace("{Namespace}", config.EntityNamespace)
|
.Replace("{Namespace}", config.EntityNamespace)
|
||||||
.Replace("{EntityName}", entityName)
|
.Replace("{EntityName}", entityName)
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ public class LiveForumDataSourceProvider : IDataSourceProvider, IScopedDependenc
|
||||||
ModelPathTemplate = "{RootPath}\\{Namespace}\\Entities\\Apps\\{EntityNamePlural}",
|
ModelPathTemplate = "{RootPath}\\{Namespace}\\Entities\\Apps\\{EntityNamePlural}",
|
||||||
ServicePathTemplate = "{AppPath}\\ApplicationServices\\Apps\\LiveForum\\{EntityNamePlural}",
|
ServicePathTemplate = "{AppPath}\\ApplicationServices\\Apps\\LiveForum\\{EntityNamePlural}",
|
||||||
ControllerPathTemplate = "{AppPath}\\Controllers\\Apps\\LiveForum\\{EntityNamePlural}",
|
ControllerPathTemplate = "{AppPath}\\Controllers\\Apps\\LiveForum\\{EntityNamePlural}",
|
||||||
ClientIndexPathTemplate = "{RootPath}\\admin-client\\src\\views\\apps\\liveforum\\{TableNameLower}",
|
ClientIndexPathTemplate = "{WebPath}\\admin-client\\src\\views\\apps\\liveforum\\{TableNameLower}",
|
||||||
ClientInfoPathTemplate = "{RootPath}\\admin-client\\src\\views\\apps\\liveforum\\{TableNameLower}",
|
ClientInfoPathTemplate = "{WebPath}\\admin-client\\src\\views\\apps\\liveforum\\{TableNameLower}",
|
||||||
ClientServicePathTemplate = "{RootPath}\\admin-client\\src\\services\\apps\\liveforum\\{TableNameLower}",
|
ClientServicePathTemplate = "{WebPath}\\admin-client\\src\\services\\apps\\liveforum\\{TableNameLower}",
|
||||||
MenuPathTemplate = "views/apps/liveforum/{TableNameLower}/Index.vue",
|
MenuPathTemplate = "views/apps/liveforum/{TableNameLower}/Index.vue",
|
||||||
RouterPathTemplate = "/apps/liveforum/{TableNameLower}",
|
RouterPathTemplate = "/apps/liveforum/{TableNameLower}",
|
||||||
TemplatePath = "/wwwroot/code_generation/templatev5/",
|
TemplatePath = "/wwwroot/code_generation/templatev5/",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user