完成模板生成功能

This commit is contained in:
橙子
2023-01-24 20:20:32 +08:00
parent 4ca7b2e023
commit 67ca25cec4
43 changed files with 135 additions and 285 deletions

View File

@@ -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}

View File

@@ -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");

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>
{

View File

@@ -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输入创建对象

View File

@@ -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
{

View File

@@ -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>
{

View File

@@ -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
{

View File

@@ -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>
{

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -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>

View File

@@ -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
{

View File

@@ -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服务实现

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -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>
/// 常量定义

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Yi.Framework.Domain</name>
<name>Yi.Template.Domain</name>
</assembly>
<members>
</members>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -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>

View File

@@ -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)
{

View File

@@ -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();

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"Yi.Framework.Web": {
"Yi.Template.Web": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,

View File

@@ -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>

View File

@@ -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();
}
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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();
// }
// }
//}

View File

@@ -1,10 +0,0 @@
using Yi.Framework.Core.DependencyInjection;
namespace Yi.Framework.Web
{
public class Test2Entity: ITransientDependency
{
[Autowired]
public TestEntity testEntity { get; set; }
}
}

View File

@@ -1,9 +0,0 @@
using Yi.Framework.Core.DependencyInjection;
namespace Yi.Framework.Web
{
public class TestEntity: ITransientDependency
{
}
}

View File

@@ -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);
}
}
}

View File

@@ -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毫秒