开始业务模块
This commit is contained in:
@@ -7,10 +7,20 @@ TemplateFactory templateFactory = new();
|
||||
|
||||
//选择需要生成的模板提供者
|
||||
|
||||
//string modelName = "GlobalSetting";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "Setting" };
|
||||
|
||||
//string modelName = "Exhibition";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "Banner" };
|
||||
string modelName = "Forum";
|
||||
string nameSpaces = "Yi.BBS";
|
||||
List<string> entityNames = new() { "Plate" };
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var entityName in entityNames)
|
||||
{
|
||||
templateFactory.CreateTemplateProviders((option) =>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server
|
||||
{
|
||||
public CreateInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}CreateInputVo.cs";
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}CreateInputVo.cs";
|
||||
TemplatePath = $@"..\..\..\Template\Server\CreateInputVoTemplate.txt";
|
||||
EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server
|
||||
{
|
||||
public GetListInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}GetListInputVo.cs";
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}GetListInputVo.cs";
|
||||
TemplatePath = $@"..\..\..\Template\Server\GetListInputVoTemplate.txt";
|
||||
EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server
|
||||
{
|
||||
public GetListOutputDtoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}GetListOutputDto.cs";
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}GetListOutputDto.cs";
|
||||
TemplatePath = $@"..\..\..\Template\Server\GetListOutputDtoTemplate.txt";
|
||||
EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs";
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Template.Provider.Server
|
||||
{
|
||||
public UpdateInputVoTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}UpdateInputVo.cs";
|
||||
BuildPath = $@"{TemplateConst.BuildRootPath}\{nameSpaces}.Application.Contracts\{TemplateConst.ModelName}\Dtos\{TemplateConst.EntityName}\{TemplateConst.EntityName}UpdateInputVo.cs";
|
||||
TemplatePath = $@"..\..\..\Template\Server\UpdateInputVoTemplate.txt";
|
||||
EntityPath = $@"{TemplateConst.BuildEntityPath}\{nameSpaces}.Domain\{TemplateConst.ModelName}\Entities\{TemplateConst.EntityName}Entity.cs";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using Yi.Framework.Ddd.Services.Abstract;
|
||||
namespace #NameSpaces#.Application.Contracts.#ModelName#
|
||||
{
|
||||
/// <summary>
|
||||
/// #EntityName#<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// #EntityName#服务抽象
|
||||
/// </summary>
|
||||
public interface I#EntityName#Service : ICrudAppService<#EntityName#GetOutputDto, #EntityName#GetListOutputDto, long, #EntityName#GetListInputVo, #EntityName#CreateInputVo, #EntityName#UpdateInputVo>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user