v3.2.666-preview20220603 #1141 #1140

This commit is contained in:
2881099 2022-06-02 20:00:11 +08:00
parent e2a4041590
commit f3b79bf2a6
2 changed files with 25 additions and 1 deletions

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Version>3.2.666-preview202200602</Version> <Version>3.2.666-preview20220603</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -308,9 +308,33 @@ WHERE (((a.""Name"") in (SELECT s.""Title"" as1
public bool? testBool1 { get; set; } public bool? testBool1 { get; set; }
public bool? testBool2 { get; set; } public bool? testBool2 { get; set; }
} }
class UserRoleToList01
{
public Guid Id { get; set; }
[Navigate(nameof(RoleId))]
public RoleToList01 Role { get; set; }
public Guid RoleId { get; set; }
}
class RoleToList01
{
public Guid Id { get; set; }
public string Name { get; set; }
}
[Fact] [Fact]
public void ToList() public void ToList()
{ {
var fsql = g.sqlite;
fsql.Delete<UserRoleToList01>().Where("1=1").ExecuteAffrows();
fsql.Delete<RoleToList01>().Where("1=1").ExecuteAffrows();
var tlrole = new RoleToList01 { Name = "管理员" };
fsql.Insert(tlrole).ExecuteAffrows();
fsql.Insert(new UserRoleToList01 { RoleId = tlrole.Id }).ExecuteAffrows();
var lst_role_menu = g.sqlite.Select<UserRoleToList01>()
.Include(f => f.Role)
.ToList(f => new
{
RoleName = f.Role.Name,
});
g.sqlite.Delete<TestDtoLeftJoin>().Where("1=1").ExecuteAffrows(); g.sqlite.Delete<TestDtoLeftJoin>().Where("1=1").ExecuteAffrows();
var testlist = select.Limit(10).ToList(); var testlist = select.Limit(10).ToList();