完成模板生成功能
This commit is contained in:
@@ -11,17 +11,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Core", "src\framework\Yi.Framework.Core\Yi.Framework.Core.csproj", "{83B2D7AD-ED8E-4392-B0AE-4227498CD75F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Application", "src\project\Yi.Framework.Application\Yi.Framework.Application.csproj", "{456835D1-4968-4195-9993-B2A580E85056}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Application", "src\project\template\Yi.Template.Application\Yi.Template.Application.csproj", "{456835D1-4968-4195-9993-B2A580E85056}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Application.Contracts", "src\project\Yi.Framework.Application.Contracts\Yi.Framework.Application.Contracts.csproj", "{D2378C23-2CFE-468A-924A-B8C9D4A3A8ED}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Application.Contracts", "src\project\template\Yi.Template.Application.Contracts\Yi.Template.Application.Contracts.csproj", "{D2378C23-2CFE-468A-924A-B8C9D4A3A8ED}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Domain", "src\project\Yi.Framework.Domain\Yi.Framework.Domain.csproj", "{C02A954D-CCCB-41BD-ADAD-9D7ECBF1A828}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Domain", "src\project\template\Yi.Template.Domain\Yi.Template.Domain.csproj", "{C02A954D-CCCB-41BD-ADAD-9D7ECBF1A828}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Domain.Shared", "src\project\Yi.Framework.Domain.Shared\Yi.Framework.Domain.Shared.csproj", "{26171153-1784-455B-9582-0558AEEC03CF}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Domain.Shared", "src\project\template\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj", "{26171153-1784-455B-9582-0558AEEC03CF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Sqlsugar", "src\project\Yi.Framework.Sqlsugar\Yi.Framework.Sqlsugar.csproj", "{3C3A7BAC-F27F-433E-BF91-289FA42E4995}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Sqlsugar", "src\project\template\Yi.Template.Sqlsugar\Yi.Template.Sqlsugar.csproj", "{3C3A7BAC-F27F-433E-BF91-289FA42E4995}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Web", "src\project\Yi.Framework.Web\Yi.Framework.Web.csproj", "{01CC7B62-F42C-45CE-BACA-F450593A1AF2}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Template.Web", "src\project\template\Yi.Template.Web\Yi.Template.Web.csproj", "{01CC7B62-F42C-45CE-BACA-F450593A1AF2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.BackgroundJobs.Quartz", "src\module\Yi.Framework.BackgroundJobs.Quartz\Yi.Framework.BackgroundJobs.Quartz.csproj", "{1879A863-9864-4E16-8492-504055807684}"
|
||||
EndProject
|
||||
@@ -51,7 +51,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Data", "src\fr
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Auth.JwtBearer", "src\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj", "{D40C583D-58BE-422D-9A57-94DECB751EB4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.Template", "src\module\Yi.Framework.Template\Yi.Framework.Template.csproj", "{134C4AB9-2AFE-4383-84DE-825DF9499CB4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Template", "src\module\Yi.Framework.Template\Yi.Framework.Template.csproj", "{134C4AB9-2AFE-4383-84DE-825DF9499CB4}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "template", "template", "{A3707874-7890-42AF-A686-E3AACD6F108C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bbs", "bbs", "{B758A87D-0BFA-44A5-BA33-FBA44151CEB4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -153,12 +157,12 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{83B2D7AD-ED8E-4392-B0AE-4227498CD75F} = {5F2B846D-96CE-400A-878E-220498F4EE31}
|
||||
{456835D1-4968-4195-9993-B2A580E85056} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{D2378C23-2CFE-468A-924A-B8C9D4A3A8ED} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{C02A954D-CCCB-41BD-ADAD-9D7ECBF1A828} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{26171153-1784-455B-9582-0558AEEC03CF} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{3C3A7BAC-F27F-433E-BF91-289FA42E4995} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{01CC7B62-F42C-45CE-BACA-F450593A1AF2} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{456835D1-4968-4195-9993-B2A580E85056} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{D2378C23-2CFE-468A-924A-B8C9D4A3A8ED} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{C02A954D-CCCB-41BD-ADAD-9D7ECBF1A828} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{26171153-1784-455B-9582-0558AEEC03CF} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{3C3A7BAC-F27F-433E-BF91-289FA42E4995} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{01CC7B62-F42C-45CE-BACA-F450593A1AF2} = {A3707874-7890-42AF-A686-E3AACD6F108C}
|
||||
{1879A863-9864-4E16-8492-504055807684} = {EEF5F221-0E32-4A3D-B647-B4B5E7305806}
|
||||
{949F35A7-36E4-4080-9940-24BE52532078} = {5F2B846D-96CE-400A-878E-220498F4EE31}
|
||||
{63BA134E-9D23-4EB8-87E4-B45B33D954F5} = {5F2B846D-96CE-400A-878E-220498F4EE31}
|
||||
@@ -174,6 +178,8 @@ Global
|
||||
{DEE07142-32CE-4B5F-A5A3-452064EBF4A2} = {5F2B846D-96CE-400A-878E-220498F4EE31}
|
||||
{D40C583D-58BE-422D-9A57-94DECB751EB4} = {5F2B846D-96CE-400A-878E-220498F4EE31}
|
||||
{134C4AB9-2AFE-4383-84DE-825DF9499CB4} = {EEF5F221-0E32-4A3D-B647-B4B5E7305806}
|
||||
{A3707874-7890-42AF-A686-E3AACD6F108C} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
{B758A87D-0BFA-44A5-BA33-FBA44151CEB4} = {32A813F5-13B2-4DCA-8B59-F27F1B0D5678}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {6C1A3808-0F4F-43FB-A9FE-5F27A3BB2ECF}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Yi.Framework.Template;
|
||||
using Yi.Framework.Core.Helper;
|
||||
using Yi.Framework.Template;
|
||||
using Yi.Framework.Template.Provider.Server;
|
||||
using Yi.Framework.Template.Provider.Site;
|
||||
|
||||
@@ -24,8 +25,6 @@ foreach (var entityName in entityNames)
|
||||
|
||||
option.Add(new ConstTemplateProvider(modelName, entityName));
|
||||
option.Add(new ProfileTemplateProvider(modelName, entityName));
|
||||
|
||||
|
||||
//option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
});
|
||||
//开始构建模板
|
||||
@@ -34,4 +33,8 @@ foreach (var entityName in entityNames)
|
||||
}
|
||||
|
||||
Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
|
||||
Console.ReadKey();
|
||||
Console.ReadKey();
|
||||
|
||||
//根据模板文件生成项目文件
|
||||
//var template = "";
|
||||
//FileHelper.AllInfoReplace(template, "Template","BBS");
|
||||
@@ -7,6 +7,10 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Core\Yi.Framework.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Template\Server\ConstTemplate.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Template.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Template.Application.Contracts.School.Dtos.StudentCreateInputVo">
|
||||
<summary>
|
||||
Student输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Template.Application.Contracts.School.IStudentService">
|
||||
<summary>
|
||||
Student
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School.Dtos
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
public class StudentGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School.Dtos
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// Student输入创建对象
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School.Dtos
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
public class StudentGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School.Dtos
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
public class StudentGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School.Dtos
|
||||
namespace Yi.Template.Application.Contracts.School.Dtos
|
||||
{
|
||||
public class StudentUpdateInputVo
|
||||
{
|
||||
@@ -3,13 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Application.Contracts.School.Dtos;
|
||||
using Yi.Template.Application.Contracts.School.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts.School
|
||||
namespace Yi.Template.Application.Contracts.School
|
||||
{
|
||||
/// <summary>
|
||||
/// Student<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// Student
|
||||
/// </summary>
|
||||
public interface IStudentService : ICrudAppService<StudentGetOutputDto, StudentGetListOutputDto, long, StudentGetListInputVo, StudentCreateInputVo, StudentUpdateInputVo>
|
||||
{
|
||||
@@ -11,7 +11,7 @@
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Framework.Domain.Shared\Yi.Framework.Domain.Shared.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -7,14 +7,14 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Domain.Shared;
|
||||
using Yi.Template.Domain.Shared;
|
||||
|
||||
namespace Yi.Framework.Application.Contracts
|
||||
namespace Yi.Template.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDomainSharedModule)
|
||||
typeof(YiTemplateDomainSharedModule)
|
||||
)]
|
||||
public class YiFrameworkApplicationContractsModule : IStartupModule
|
||||
public class YiTemplateApplicationContractsModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Framework.Application</name>
|
||||
<name>Yi.Template.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Framework.Application.School.StudentService">
|
||||
<member name="T:Yi.Template.Application.School.StudentService">
|
||||
<summary>
|
||||
Student服务实现
|
||||
</summary>
|
||||
@@ -4,10 +4,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Application.Contracts.School.Dtos;
|
||||
using Yi.Framework.Domain.School.Entities;
|
||||
using Yi.Template.Application.Contracts.School.Dtos;
|
||||
using Yi.Template.Domain.School.Entities;
|
||||
|
||||
namespace Yi.Framework.Application.School.MapperConfig
|
||||
namespace Yi.Template.Application.School.MapperConfig
|
||||
{
|
||||
public class StudentProfile: Profile
|
||||
{
|
||||
@@ -1,10 +1,10 @@
|
||||
using Yi.Framework.Application.Contracts.School;
|
||||
using Yi.Template.Application.Contracts.School;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.Framework.Application.Contracts.School.Dtos;
|
||||
using Yi.Framework.Domain.School.Entities;
|
||||
using Yi.Template.Application.Contracts.School.Dtos;
|
||||
using Yi.Template.Domain.School.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.Framework.Application.School
|
||||
namespace Yi.Template.Application.School
|
||||
{
|
||||
/// <summary>
|
||||
/// Student服务实现
|
||||
@@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./ApplicationSwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Uow\Yi.Framework.Uow.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Application.Contracts\Yi.Template.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="ApplicationSwaggerDoc.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -6,21 +6,21 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Application.Contracts;
|
||||
using Yi.Template.Application.Contracts;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Domain;
|
||||
using Yi.Template.Domain;
|
||||
|
||||
namespace Yi.Framework.Application
|
||||
namespace Yi.Template.Application
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkApplicationContractsModule),
|
||||
typeof(YiFrameworkDomainModule),
|
||||
typeof(YiTemplateApplicationContractsModule),
|
||||
typeof(YiTemplateDomainModule),
|
||||
typeof(YiFrameworkAuthJwtBearerModule)
|
||||
)]
|
||||
public class YiFrameworkApplicationModule : IStartupModule
|
||||
public class YiTemplateApplicationModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Domain.Shared.School.ConstClasses
|
||||
namespace Yi.Template.Domain.Shared.School.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
@@ -9,7 +9,7 @@
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Ddd\Yi.Framework.Ddd.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd\Yi.Framework.Ddd.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -9,12 +9,12 @@ using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Ddd;
|
||||
|
||||
namespace Yi.Framework.Domain.Shared
|
||||
namespace Yi.Template.Domain.Shared
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDddModule)
|
||||
)]
|
||||
public class YiFrameworkDomainSharedModule : IStartupModule
|
||||
public class YiTemplateDomainSharedModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Framework.Domain</name>
|
||||
<name>Yi.Template.Domain</name>
|
||||
</assembly>
|
||||
<members>
|
||||
</members>
|
||||
@@ -5,9 +5,9 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.DataSeeds;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.Framework.Domain.School.Entities;
|
||||
using Yi.Template.Domain.School.Entities;
|
||||
|
||||
namespace Yi.Framework.Domain.School.DataSeeds
|
||||
namespace Yi.Template.Domain.School.DataSeeds
|
||||
{
|
||||
[AppService(typeof(IDataSeed))]
|
||||
public class StudentDataSeed : AbstractDataSeed<StudentEntity>
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.Framework.Domain.School.Entities
|
||||
namespace Yi.Template.Domain.School.Entities
|
||||
{
|
||||
[SugarTable("Student")]
|
||||
public class StudentEntity : IEntity<long>,ISoftDelete
|
||||
@@ -11,8 +11,8 @@
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Domain.Shared\Yi.Framework.Domain.Shared.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -8,15 +8,15 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Framework.Domain.Shared;
|
||||
using Yi.Template.Domain.Shared;
|
||||
|
||||
namespace Yi.Framework.Domain
|
||||
namespace Yi.Template.Domain
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDomainSharedModule),
|
||||
typeof(YiTemplateDomainSharedModule),
|
||||
typeof(YiFrameworkDataModule)
|
||||
)]
|
||||
public class YiFrameworkDomainModule : IStartupModule
|
||||
public class YiTemplateDomainModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -10,8 +10,8 @@
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Domain\Yi.Framework.Domain.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -8,13 +8,13 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.Framework.Domain;
|
||||
using Yi.Template.Domain;
|
||||
|
||||
namespace Yi.Framework.Sqlsugar
|
||||
namespace Yi.Template.Sqlsugar
|
||||
{
|
||||
[DependsOn(typeof(YiFrameworkCoreSqlsugarModule),
|
||||
typeof(YiFrameworkDomainModule))]
|
||||
public class YiFrameworkSqlsugarModule : IStartupModule
|
||||
typeof(YiTemplateDomainModule))]
|
||||
public class YiTemplateSqlsugarModule : IStartupModule
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -2,26 +2,23 @@ using AspNetCore.Microsoft.AspNetCore.Hosting;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.Framework.Web;
|
||||
using Yi.Template.Web;
|
||||
|
||||
TimeTest.Start();
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
//设置启动url
|
||||
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
||||
|
||||
//添加模块
|
||||
builder.UseYiModules(typeof(YiFrameworkWebModule));
|
||||
builder.UseYiModules(typeof(YiTemplateWebModule));
|
||||
|
||||
//添加autofac模块,需要添加模块
|
||||
builder.Host.ConfigureAutoFacContainer(container =>
|
||||
{
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiFrameworkWebModule).Assembly);
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiTemplateWebModule).Assembly);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
var t = app.Services.GetService<Test2Entity>();
|
||||
|
||||
//全局错误中间件,需要放在最早
|
||||
app.UseErrorHandlingServer();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"Yi.Framework.Web": {
|
||||
"Yi.Template.Web": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
@@ -11,8 +11,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Framework.Application\Yi.Framework.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Sqlsugar\Yi.Framework.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Application\Yi.Template.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.Template.Sqlsugar\Yi.Template.Sqlsugar.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -1,18 +1,18 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Builder;
|
||||
using StartupModules;
|
||||
using Yi.Framework.Application;
|
||||
using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Sqlsugar;
|
||||
using Yi.Template.Application;
|
||||
using Yi.Template.Sqlsugar;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
namespace Yi.Template.Web
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkSqlsugarModule),
|
||||
typeof(YiFrameworkApplicationModule)
|
||||
typeof(YiTemplateSqlsugarModule),
|
||||
typeof(YiTemplateApplicationModule)
|
||||
)]
|
||||
public class YiFrameworkWebModule : IStartupModule
|
||||
public class YiTemplateWebModule : IStartupModule
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
@@ -21,11 +21,11 @@ namespace Yi.Framework.Web
|
||||
services.AddAutoApiService(opt =>
|
||||
{
|
||||
//NETServiceTest所在程序集添加进动态api配置
|
||||
opt.CreateConventional(typeof(YiFrameworkApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
opt.CreateConventional(typeof(YiTemplateApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
});
|
||||
|
||||
//添加swagger
|
||||
services.AddSwaggerServer<YiFrameworkApplicationModule>();
|
||||
services.AddSwaggerServer<YiTemplateApplicationModule>();
|
||||
}
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
@@ -39,8 +39,6 @@ namespace Yi.Framework.Web
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseRouting();
|
||||
TimeTest.Result();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Framework.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.Framework.Application.Contracts.School.Dtos.StudentCreateInputVo">
|
||||
<summary>
|
||||
Student输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Application.Contracts.School.IStudentService">
|
||||
<summary>
|
||||
Student<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,20 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>./ApplicationSwaggerDoc.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj" />
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Uow\Yi.Framework.Uow.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Application.Contracts\Yi.Framework.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Domain\Yi.Framework.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,27 +0,0 @@
|
||||
//using SqlSugar;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
//using Yi.Framework.Core.Sqlsugar.Repositories;
|
||||
//using Yi.Framework.Domain.Teacher.Entities;
|
||||
//using Yi.Framework.Domain.Teacher.Repositories;
|
||||
|
||||
//namespace Yi.Framework.Sqlsugar.Teacher
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 仓储实现方式
|
||||
// /// </summary>
|
||||
// public class StudentRepository : SqlsugarRepository<StudentEntity>, IStudentRepository
|
||||
// {
|
||||
// public StudentRepository(ISqlSugarClient context) : base(context)
|
||||
// {
|
||||
// }
|
||||
|
||||
// public async Task<List<StudentEntity>> GetMyListAsync()
|
||||
// {
|
||||
// return await _DbQueryable.ToListAsync();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -1,10 +0,0 @@
|
||||
using Yi.Framework.Core.DependencyInjection;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
public class Test2Entity: ITransientDependency
|
||||
{
|
||||
[Autowired]
|
||||
public TestEntity testEntity { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using Yi.Framework.Core.DependencyInjection;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
public class TestEntity: ITransientDependency
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
public class TimeTest
|
||||
{
|
||||
public static Stopwatch Stopwatch { get; set; }
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
Stopwatch=new Stopwatch();
|
||||
Stopwatch.Start();
|
||||
}
|
||||
public static void Result()
|
||||
{
|
||||
|
||||
Stopwatch.Stop();
|
||||
string time = Stopwatch.ElapsedMilliseconds.ToString();
|
||||
Stopwatch.Restart();
|
||||
string res = $"{DateTime.Now.ToString("yyyy:MM:dd-HH:mm:ss")}本次运行启动时间为:{time}毫秒\r\n";
|
||||
Console.WriteLine(res);
|
||||
File.AppendAllText("./TimeTest.txt", res);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
2023:01:16-22:36:40本次运行启动时间为:2089毫秒
|
||||
2023:01:16-22:36:49本次运行启动时间为:2021毫秒
|
||||
2023:01:16-22:37:01本次运行启动时间为:2072毫秒
|
||||
2023:01:16-22:39:23本次运行启动时间为:2075毫秒
|
||||
2023:01:16-22:40:48本次运行启动时间为:2172毫秒
|
||||
2023:01:16-22:41:12本次运行启动时间为:2142毫秒
|
||||
2023:01:16-22:42:05本次运行启动时间为:2008毫秒
|
||||
2023:01:16-22:43:22本次运行启动时间为:1910毫秒
|
||||
2023:01:16-22:44:33本次运行启动时间为:2017毫秒
|
||||
2023:01:17-17:30:46本次运行启动时间为:23171毫秒
|
||||
2023:01:17-17:45:11本次运行启动时间为:4771毫秒
|
||||
2023:01:17-17:45:54本次运行启动时间为:1917毫秒
|
||||
2023:01:17-17:48:04本次运行启动时间为:2138毫秒
|
||||
2023:01:17-17:57:41本次运行启动时间为:1907毫秒
|
||||
2023:01:17-17:58:29本次运行启动时间为:1895毫秒
|
||||
2023:01:17-17:58:43本次运行启动时间为:1937毫秒
|
||||
2023:01:17-17:59:38本次运行启动时间为:1856毫秒
|
||||
2023:01:17-21:06:57本次运行启动时间为:2285毫秒
|
||||
2023:01:17-21:09:32本次运行启动时间为:2007毫秒
|
||||
2023:01:17-21:10:16本次运行启动时间为:1862毫秒
|
||||
2023:01:17-21:12:25本次运行启动时间为:2055毫秒
|
||||
2023:01:17-21:13:46本次运行启动时间为:5606毫秒
|
||||
2023:01:17-21:14:35本次运行启动时间为:4824毫秒
|
||||
2023:01:17-21:18:17本次运行启动时间为:8985毫秒
|
||||
2023:01:17-21:19:48本次运行启动时间为:1859毫秒
|
||||
2023:01:17-21:21:32本次运行启动时间为:1786毫秒
|
||||
2023:01:17-22:41:17本次运行启动时间为:1901毫秒
|
||||
2023:01:17-22:42:21本次运行启动时间为:1946毫秒
|
||||
2023:01:17-22:42:55本次运行启动时间为:1970毫秒
|
||||
2023:01:17-22:43:56本次运行启动时间为:2023毫秒
|
||||
2023:01:17-22:45:25本次运行启动时间为:1803毫秒
|
||||
2023:01:17-22:45:52本次运行启动时间为:1877毫秒
|
||||
2023:01:17-23:24:07本次运行启动时间为:1836毫秒
|
||||
2023:01:17-23:29:20本次运行启动时间为:1958毫秒
|
||||
2023:01:17-23:45:25本次运行启动时间为:2016毫秒
|
||||
2023:01:18-19:34:47本次运行启动时间为:2631毫秒
|
||||
2023:01:18-19:36:58本次运行启动时间为:2551毫秒
|
||||
2023:01:18-19:40:12本次运行启动时间为:1978毫秒
|
||||
2023:01:19-13:52:51本次运行启动时间为:2600毫秒
|
||||
2023:01:19-13:54:09本次运行启动时间为:2180毫秒
|
||||
2023:01:19-13:54:43本次运行启动时间为:2122毫秒
|
||||
2023:01:19-13:55:58本次运行启动时间为:2355毫秒
|
||||
2023:01:19-14:03:10本次运行启动时间为:2144毫秒
|
||||
2023:01:19-14:08:44本次运行启动时间为:2279毫秒
|
||||
2023:01:19-14:13:40本次运行启动时间为:2188毫秒
|
||||
2023:01:19-14:28:11本次运行启动时间为:2207毫秒
|
||||
2023:01:19-14:31:37本次运行启动时间为:2216毫秒
|
||||
2023:01:19-14:35:15本次运行启动时间为:2428毫秒
|
||||
2023:01:19-14:38:41本次运行启动时间为:2141毫秒
|
||||
2023:01:19-14:40:57本次运行启动时间为:2220毫秒
|
||||
2023:01:19-14:47:12本次运行启动时间为:2234毫秒
|
||||
2023:01:19-14:49:25本次运行启动时间为:2202毫秒
|
||||
2023:01:19-14:51:18本次运行启动时间为:2175毫秒
|
||||
2023:01:19-14:53:52本次运行启动时间为:2250毫秒
|
||||
2023:01:19-14:54:38本次运行启动时间为:2145毫秒
|
||||
2023:01:19-14:55:21本次运行启动时间为:2123毫秒
|
||||
2023:01:19-15:20:38本次运行启动时间为:2486毫秒
|
||||
2023:01:19-15:22:37本次运行启动时间为:2251毫秒
|
||||
2023:01:19-15:26:31本次运行启动时间为:2182毫秒
|
||||
2023:01:19-15:28:47本次运行启动时间为:2187毫秒
|
||||
2023:01:19-15:29:07本次运行启动时间为:2163毫秒
|
||||
2023:01:19-15:29:57本次运行启动时间为:2307毫秒
|
||||
2023:01:19-15:35:21本次运行启动时间为:3172毫秒
|
||||
2023:01:19-17:47:34本次运行启动时间为:2598毫秒
|
||||
2023:01:19-17:52:49本次运行启动时间为:1940毫秒
|
||||
2023:01:19-17:54:41本次运行启动时间为:1861毫秒
|
||||
2023:01:19-17:57:37本次运行启动时间为:1945毫秒
|
||||
2023:01:20-18:25:59本次运行启动时间为:43382毫秒
|
||||
2023:01:20-18:29:09本次运行启动时间为:2173毫秒
|
||||
2023:01:20-18:32:14本次运行启动时间为:2397毫秒
|
||||
2023:01:20-18:34:14本次运行启动时间为:2126毫秒
|
||||
2023:01:20-18:38:36本次运行启动时间为:2152毫秒
|
||||
2023:01:20-18:45:15本次运行启动时间为:7203毫秒
|
||||
2023:01:20-18:50:46本次运行启动时间为:6513毫秒
|
||||
2023:01:20-18:53:16本次运行启动时间为:5186毫秒
|
||||
2023:01:20-19:01:36本次运行启动时间为:5194毫秒
|
||||
2023:01:21-15:04:00本次运行启动时间为:7763毫秒
|
||||
2023:01:21-18:34:52本次运行启动时间为:2507毫秒
|
||||
2023:01:21-22:17:17本次运行启动时间为:2137毫秒
|
||||
2023:01:21-22:18:22本次运行启动时间为:2040毫秒
|
||||
2023:01:21-22:20:13本次运行启动时间为:1611毫秒
|
||||
2023:01:21-22:20:37本次运行启动时间为:1525毫秒
|
||||
2023:01:21-22:21:52本次运行启动时间为:1563毫秒
|
||||
2023:01:21-22:29:30本次运行启动时间为:9099毫秒
|
||||
2023:01:21-22:30:38本次运行启动时间为:2136毫秒
|
||||
2023:01:21-23:15:24本次运行启动时间为:1944毫秒
|
||||
2023:01:24-13:26:35本次运行启动时间为:2712毫秒
|
||||
2023:01:24-13:39:09本次运行启动时间为:2031毫秒
|
||||
2023:01:24-13:42:17本次运行启动时间为:2087毫秒
|
||||
2023:01:24-13:44:55本次运行启动时间为:1877毫秒
|
||||
2023:01:24-13:45:55本次运行启动时间为:19905毫秒
|
||||
Reference in New Issue
Block a user