Skip to content

Commit

Permalink
v3.2.666-preview20220603 #1141 #1140
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Jun 2, 2022
1 parent e2a4041 commit f3b79bf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>3.2.666-preview202200602</Version>
<Version>3.2.666-preview20220603</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
24 changes: 24 additions & 0 deletions FreeSql.Tests/FreeSql.Tests/Sqlite/Curd/SqliteSelectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,33 @@ class TestDtoLeftJoin
public bool? testBool1 { 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]
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();
var testlist = select.Limit(10).ToList();
Expand Down

0 comments on commit f3b79bf

Please sign in to comment.