mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 优化 RawJoin 支持 FULL JOIN 等自定义联表映射;
This commit is contained in:
@ -271,7 +271,7 @@ namespace base_entity
|
||||
if (CommandTimeoutCascade._asyncLocalTimeout.Value > 0)
|
||||
e.Command.CommandTimeout = CommandTimeoutCascade._asyncLocalTimeout.Value;
|
||||
};
|
||||
|
||||
|
||||
using (new CommandTimeoutCascade(1000))
|
||||
{
|
||||
fsql.Select<Order>().ToList();
|
||||
@ -280,6 +280,16 @@ namespace base_entity
|
||||
}
|
||||
|
||||
|
||||
var sql1 = fsql.Select<User1, UserGroup>()
|
||||
.RawJoin("FULL JOIN UserGroup b ON b.id = a.GroupId")
|
||||
.Where((a, b) => a.IsDeleted == false)
|
||||
.ToSql((a, b) => new
|
||||
{
|
||||
user = a, group = b
|
||||
});
|
||||
sql1 = sql1.Replace("INNER JOIN ", "FULL JOIN ");
|
||||
|
||||
|
||||
|
||||
fsql.UseJsonMap();
|
||||
|
||||
|
Reference in New Issue
Block a user