mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-11 19:56:37 +08:00
@@ -4,6 +4,8 @@ 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;
|
||||
|
||||
@@ -12,7 +14,10 @@ namespace Yi.Framework.Sqlsugar.Student
|
||||
/// <summary>
|
||||
/// 仓储实现方式
|
||||
/// </summary>
|
||||
public class StudentRepository : IStudentRepository
|
||||
public class StudentRepository : SqlsugarRepository<StudentEntity> ,IStudentRepository
|
||||
{
|
||||
public StudentRepository(ISqlSugarClient context) : base(context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Domain\Yi.Framework.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StartupModules;
|
||||
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
|
||||
{
|
||||
[DependsOn(typeof(YiFrameworkDomainModule))]
|
||||
public class YiFrameworkSqlsugarModule : AbpModule
|
||||
public class YiFrameworkSqlsugarModule : IStartupModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||
{
|
||||
context.Services.AddTransient<IStudentRepository, StudentRepository>();
|
||||
}
|
||||
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
||||
{
|
||||
services.AddTransient<IStudentRepository, StudentRepository>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user