更改abp.vnext

This commit is contained in:
陈淳
2023-01-13 18:03:08 +08:00
parent 65377d9236
commit c905489ea5
22 changed files with 168 additions and 196 deletions

View File

@@ -4,8 +4,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Core.Sqlsugar.Repository;
using Yi.Framework.Ddd.Repository;
using Yi.Framework.Domain.Student.Entities;
using Yi.Framework.Domain.Student.IRepository;
@@ -14,10 +12,7 @@ namespace Yi.Framework.Sqlsugar.Student
/// <summary>
/// 仓储实现方式
/// </summary>
public class StudentRepository : SqlsugarRepository<StudentEntity> ,IStudentRepository
public class StudentRepository : IStudentRepository
{
public StudentRepository(ISqlSugarClient context) : base(context)
{
}
}
}

View File

@@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
<ProjectReference Include="..\Yi.Framework.Domain\Yi.Framework.Domain.csproj" />
</ItemGroup>

View File

@@ -1,25 +1,29 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using StartupModules;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Modularity;
using Yi.Framework.Domain;
using Yi.Framework.Domain.Student.IRepository;
using Yi.Framework.Sqlsugar.Student;
namespace Yi.Framework.Sqlsugar
{
public class YiFrameworkSqlsugarModule : IStartupModule
[DependsOn(typeof(YiFrameworkDomainModule))]
public class YiFrameworkSqlsugarModule : AbpModule
{
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddTransient<IStudentRepository, StudentRepository>();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
}
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
{
services.AddTransient<IStudentRepository, StudentRepository>();
}
}
}