Update unit test

This commit is contained in:
sunkaixuan 2023-09-08 15:37:53 +08:00
parent cadb531ffb
commit f2e245b3c1

View File

@ -27,7 +27,7 @@ namespace OrmTest
Name= "b", Name= "b",
SchoolId=1, SchoolId=1,
}).ExecuteCommand(); }).ExecuteCommand();
Db.DeleteNav<School>(s => s.Id.Equals(4)) Db.DeleteNav<School>(s => s.Id.Equals(1))
.Include(s => s.Grades).ExecuteCommandAsync().GetAwaiter().GetResult(); .Include(s => s.Grades).ExecuteCommandAsync().GetAwaiter().GetResult();
Console.ReadLine(); Console.ReadLine();
@ -41,7 +41,7 @@ namespace OrmTest
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)] [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string? Name { get; set; }
[Navigate(NavigateType.OneToOne, nameof(Grade.SchoolId))] [Navigate(NavigateType.OneToOne, nameof(Id), nameof(Grade.SchoolId))]
public Grade Grades { get; set; } public Grade Grades { get; set; }
} }
[SugarTable("unitGradedfadsaa")] [SugarTable("unitGradedfadsaa")]