修改各层关系

领域层不能依赖sqlsugar层
sqlsugar层依赖领域层
This commit is contained in:
陈淳
2023-01-12 15:25:46 +08:00
parent 7706126479
commit 318cfb5fe2
12 changed files with 34 additions and 27 deletions

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Domain.Shared.Student.IRepository;
namespace Yi.Framework.Application.Contracts.Student
{

View File

@@ -6,8 +6,8 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Application.Contracts.Student;
using Yi.Framework.Domain.Shared.Student.IRepository;
using Yi.Framework.Domain.Student;
using Yi.Framework.Domain.Student.IRepository;
namespace Yi.Framework.Application.Student
{

View File

@@ -17,6 +17,7 @@
<ItemGroup>
<Folder Include="Options\" />
<Folder Include="Uow\" />
</ItemGroup>
</Project>

View File

@@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Domain.Shared.Student.IRepository
{
/// <summary>
/// 仓储抽象
/// </summary>
public interface IStudentRepository
{
}
}

View File

@@ -1,5 +1,4 @@
using SqlSugar;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -10,7 +9,6 @@ namespace Yi.Framework.Domain.Student.Entities
/// <summary>
/// 实体
/// </summary>
[SugarTable("Student")]
public class StudentEntity
{
public long Id { get; set; }

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Ddd.Repository;
using Yi.Framework.Domain.Student.Entities;
namespace Yi.Framework.Domain.Student.IRepository
{
/// <summary>
/// 仓储抽象
/// </summary>
public interface IStudentRepository:IRepository<StudentEntity>
{
}
}

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Domain.Shared.Student.IRepository;
using Yi.Framework.Domain.Student.IRepository;
namespace Yi.Framework.Domain.Student
{

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Domain.Shared.Student.IRepository;
using Yi.Framework.Domain.Student.IRepository;
using Yi.Framework.Sqlsugar.Student;
namespace Yi.Framework.Sqlsugar

View File

@@ -9,6 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\Yi.Framework.Application\Yi.Framework.Application.csproj" />
<ProjectReference Include="..\Yi.Framework.Core.Autofac\Yi.Framework.Core.Autofac.csproj" />
<ProjectReference Include="..\Yi.Framework.Sqlsugar\Yi.Framework.Sqlsugar.csproj" />
</ItemGroup>
</Project>