From 3e71fb84a5da0d6ce48a2192dc72443623bf4014 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 21 Jan 2024 02:13:14 +0800 Subject: [PATCH] Add unit test --- .../UserTestCases/UnitTest/UintSubListadfa.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UintSubListadfa.cs b/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UintSubListadfa.cs index 9c11a566d..6ab657346 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UintSubListadfa.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UintSubListadfa.cs @@ -40,6 +40,7 @@ namespace OrmTest .ToList(); } + [SugarTable("Teacherdsfafafa")] public class Teacher { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] @@ -56,13 +57,16 @@ namespace OrmTest public List ClassRoom { get; set; } } - + [SugarTable("ClassRoomfafafa")] public class ClassRoom { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } public string Name { get; set; } + [Navigate(NavigateType.OneToMany,nameof(Student.ClassId),nameof(StudentClass.ClassId))] + + public List Students { get; set; } } public class ClassRoomView @@ -71,8 +75,10 @@ namespace OrmTest public string Name { get; set; } public bool HasStudent { get; set; } - } + public List Students { get; set; } + } + [SugarTable("TeacherClassfafafa")] public class TeacherClass { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] @@ -82,7 +88,7 @@ namespace OrmTest public int ClassRoomId { get; set; } } - + [SugarTable("StarClassfafafa")] public class StarClass { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] @@ -90,7 +96,7 @@ namespace OrmTest public int ClassId { get; set; } } - + [SugarTable("Studentfafafa")] public class Student { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] @@ -98,7 +104,7 @@ namespace OrmTest public int ClassId { get; set; } } - + [SugarTable("StudentClassfafafa")] public class StudentClass { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]