Add unit test

This commit is contained in:
sunkaixuan 2022-08-21 15:46:06 +08:00
parent 63cc920a16
commit 76fd8b07a8

View File

@ -261,7 +261,8 @@ namespace OrmTest
.ThenInclude(z1 => z1.RoomList) .ThenInclude(z1 => z1.RoomList)
.Include(z1 => z1.Books).ExecuteCommand(); .Include(z1 => z1.Books).ExecuteCommand();
db.Queryable<StudentA>()
.Where(it => it.Books2.Any(z => z.BookId == 1)).ToList();
} }
public class UnitA001 public class UnitA001
@ -330,6 +331,9 @@ namespace OrmTest
[Navigate(NavigateType.OneToMany, nameof(BookA.studenId))] [Navigate(NavigateType.OneToMany, nameof(BookA.studenId))]
public List<BookA> Books { get; set; } public List<BookA> Books { get; set; }
[Navigate(NavigateType.OneToMany, nameof(BookA.studenId),nameof(StudentId))]
public List<BookA> Books2 { get; set; }
} }
public class SchoolA public class SchoolA
{ {