mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
parent
e2a4041590
commit
f3b79bf2a6
@ -9,7 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>3.2.666-preview202200602</Version>
|
<Version>3.2.666-preview20220603</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user