- 优化 IUpdateJoin AsTable 同时对多表名设置;

This commit is contained in:
2881099
2023-10-24 12:52:09 +08:00
parent 632c5cabf4
commit 09225ffd12
5 changed files with 18 additions and 18 deletions

View File

@ -559,7 +559,7 @@ namespace base_entity
//.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
//.UseQuoteSqlName(false)
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=3;AllowLoadLocalInfile=true")
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
@ -600,6 +600,12 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
var updatejoin031sql = fsql.Update<User1>()
.Join<UserGroup>((a, b) => a.GroupId == b.Id)
.AsTable("t1", "t2")
.Set((a, b) => b.GroupName == a.Username + "b.groupname")
.ToSql();
fsql.CodeFirst.Entity<B11>(e =>
{
e.Help().Navigate(b => b.a, nameof(B11.Id));
@ -618,11 +624,6 @@ namespace base_entity
fsql.GlobalFilter.Apply<User1>("test01", a => a.IsDeleted == false);
var updatejoin031sql = fsql.Update<User1>()
.Join<UserGroup>((a, b) => a.GroupId == b.Id)
.Set((a, b) => b.GroupName == a.Username + "b.groupname")
.ToSql();
fsql.UseJsonMap();
fsql.Select<MiDevice>().Where(a => a.FormLocking == null).Count();