mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修复 Ado.Net 扩展方法的多表查询 bug;#592
This commit is contained in:
64
FreeSql.Tests/FreeSql.Tests/Issues/592.cs
Normal file
64
FreeSql.Tests/FreeSql.Tests/Issues/592.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Xunit;
|
||||
|
||||
namespace FreeSql.Tests.Issues
|
||||
{
|
||||
public class _592
|
||||
{
|
||||
[Fact]
|
||||
public void AdoNet()
|
||||
{
|
||||
using (var conn = g.mysql.Ado.MasterPool.Get())
|
||||
{
|
||||
var list = conn.Value.Select<park_sys_users, park_sys_userrole>()
|
||||
.LeftJoin((rs, le) => rs.user_id == le.ur_userid)
|
||||
.Where((rs, le) => rs.user_id > 0)
|
||||
.Count();
|
||||
}
|
||||
}
|
||||
|
||||
[Table(Name = "park_sys_users")]
|
||||
public partial class park_sys_users
|
||||
{
|
||||
public park_sys_users()
|
||||
{
|
||||
}
|
||||
|
||||
[Column(IsIdentity = true)]
|
||||
public int user_id { get; set; }
|
||||
public string user_loginname { get; set; }
|
||||
public string user_name { get; set; }
|
||||
public string user_pwd { get; set; }
|
||||
public int user_type { get; set; }
|
||||
public string user_spotid { get; set; }
|
||||
public string user_phone { get; set; }
|
||||
public string user_email { get; set; }
|
||||
public string user_remark { get; set; }
|
||||
public int user_specialrole { get; set; }
|
||||
public string user_createuser { get; set; }
|
||||
public DateTime user_createtime { get; set; }
|
||||
public int user_state { get; set; }
|
||||
public int user_managetype { get; set; }
|
||||
}
|
||||
|
||||
public partial class park_sys_userrole
|
||||
{
|
||||
public park_sys_userrole()
|
||||
{
|
||||
}
|
||||
|
||||
public int ur_id { get; set; }
|
||||
public int ur_userid { get; set; }
|
||||
public int ur_roleid { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user