mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 增加 多表 As 设置别名的方法;
This commit is contained in:
@ -35,6 +35,13 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2> ISelect<T1, T2>.As(string aliasT1, string aliasT2)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2>.WithTempQuery<TDto>(Expression<Func<T1, T2, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -501,6 +508,14 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3> ISelect<T1, T2, T3>.As(string aliasT1, string aliasT2, string aliasT3)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -969,6 +984,15 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4> ISelect<T1, T2, T3, T4>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -1439,6 +1463,16 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5> ISelect<T1, T2, T3, T4, T5>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -1911,6 +1945,17 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6> ISelect<T1, T2, T3, T4, T5, T6>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -2385,6 +2430,18 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7> ISelect<T1, T2, T3, T4, T5, T6, T7>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -2861,6 +2918,19 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -3339,6 +3409,20 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -3819,6 +3903,21 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -4301,6 +4400,22 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -4785,6 +4900,23 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11, string aliasT12)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
if (string.IsNullOrEmpty(aliasT12) == false) _tables[11].Alias = aliasT12;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -5271,6 +5403,24 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11, string aliasT12, string aliasT13)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
if (string.IsNullOrEmpty(aliasT12) == false) _tables[11].Alias = aliasT12;
|
||||
if (string.IsNullOrEmpty(aliasT13) == false) _tables[12].Alias = aliasT13;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -5759,6 +5909,25 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11, string aliasT12, string aliasT13, string aliasT14)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
if (string.IsNullOrEmpty(aliasT12) == false) _tables[11].Alias = aliasT12;
|
||||
if (string.IsNullOrEmpty(aliasT13) == false) _tables[12].Alias = aliasT13;
|
||||
if (string.IsNullOrEmpty(aliasT14) == false) _tables[13].Alias = aliasT14;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -6249,6 +6418,26 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11, string aliasT12, string aliasT13, string aliasT14, string aliasT15)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
if (string.IsNullOrEmpty(aliasT12) == false) _tables[11].Alias = aliasT12;
|
||||
if (string.IsNullOrEmpty(aliasT13) == false) _tables[12].Alias = aliasT13;
|
||||
if (string.IsNullOrEmpty(aliasT14) == false) _tables[13].Alias = aliasT14;
|
||||
if (string.IsNullOrEmpty(aliasT15) == false) _tables[14].Alias = aliasT15;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
@ -6741,6 +6930,27 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.As(string aliasT1, string aliasT2, string aliasT3, string aliasT4, string aliasT5, string aliasT6, string aliasT7, string aliasT8, string aliasT9, string aliasT10, string aliasT11, string aliasT12, string aliasT13, string aliasT14, string aliasT15, string aliasT16)
|
||||
{
|
||||
if (string.IsNullOrEmpty(aliasT1) == false) _tables[0].Alias = aliasT1;
|
||||
if (string.IsNullOrEmpty(aliasT2) == false) _tables[1].Alias = aliasT2;
|
||||
if (string.IsNullOrEmpty(aliasT3) == false) _tables[2].Alias = aliasT3;
|
||||
if (string.IsNullOrEmpty(aliasT4) == false) _tables[3].Alias = aliasT4;
|
||||
if (string.IsNullOrEmpty(aliasT5) == false) _tables[4].Alias = aliasT5;
|
||||
if (string.IsNullOrEmpty(aliasT6) == false) _tables[5].Alias = aliasT6;
|
||||
if (string.IsNullOrEmpty(aliasT7) == false) _tables[6].Alias = aliasT7;
|
||||
if (string.IsNullOrEmpty(aliasT8) == false) _tables[7].Alias = aliasT8;
|
||||
if (string.IsNullOrEmpty(aliasT9) == false) _tables[8].Alias = aliasT9;
|
||||
if (string.IsNullOrEmpty(aliasT10) == false) _tables[9].Alias = aliasT10;
|
||||
if (string.IsNullOrEmpty(aliasT11) == false) _tables[10].Alias = aliasT11;
|
||||
if (string.IsNullOrEmpty(aliasT12) == false) _tables[11].Alias = aliasT12;
|
||||
if (string.IsNullOrEmpty(aliasT13) == false) _tables[12].Alias = aliasT13;
|
||||
if (string.IsNullOrEmpty(aliasT14) == false) _tables[13].Alias = aliasT14;
|
||||
if (string.IsNullOrEmpty(aliasT15) == false) _tables[14].Alias = aliasT15;
|
||||
if (string.IsNullOrEmpty(aliasT16) == false) _tables[15].Alias = aliasT16;
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>.WithTempQuery<TDto>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
|
@ -119,6 +119,7 @@ public interface ISelect<<#=NewStr #>> : ISelect0<ISelect<<#=NewStr #>>, T1> <#=
|
||||
ISelect<<#=NewStr #>> OrderByIf<TMember>(bool condition, Expression<Func<<#=NewStr #>, TMember>> column, bool descending = false);
|
||||
|
||||
ISelect<<#=NewStr #>> WithSql(<#=string.Join(",",WithSql)#>, object parms = null);
|
||||
ISelect<<#=NewStr #>> As(<#=string.Join(",",WithSql).Replace("string sqlT", "string aliasT")#>);
|
||||
|
||||
ISelect<TDto> WithTempQuery<TDto>(Expression<Func<<#=NewStr #>, TDto>> selector);
|
||||
|
||||
|
@ -25,6 +25,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var whereStr = "";
|
||||
var ISelectGroupingAggregate = new List<string>();
|
||||
var WithSql = new List<string>();
|
||||
var Alias = new List<string>();
|
||||
|
||||
List<string> SyncStructure = new List<string>();
|
||||
StringBuilder _tables = new StringBuilder();
|
||||
@ -53,6 +54,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
ISelectGroupingAggregate.Add($"ISelectGroupingAggregate<T{i}>");
|
||||
WithSql.Add($"string sqlT{i}");
|
||||
Alias.Add($"if (string.IsNullOrEmpty(aliasT" + i + ") == false) _tables[" + (i-1) + "].Alias = aliasT" + i + ";");
|
||||
GetToListDtoSelector.Add("Expression.Parameter(typeof(T" + i + "), \"" + (abc[i - 1]) + "\")");
|
||||
|
||||
AsTable.Append("if (type == _tables[" + (i - 1) + "].Table?.Type && string.IsNullOrEmpty(sqlT" + i +
|
||||
@ -83,6 +85,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<<#=NewStr #>> ISelect<<#=NewStr #>>.As(<#=string.Join(",", WithSql).Replace("string sqlT", "string aliasT") #>)
|
||||
{
|
||||
<#=string.Join("\r\n ", Alias) #>
|
||||
return this;
|
||||
}
|
||||
|
||||
ISelect<TDto> ISelect<<#=NewStr #>>.WithTempQuery<TDto>(Expression<Func<<#=NewStr #>, TDto>> selector)
|
||||
{
|
||||
for (var a = 0; a < selector.Parameters.Count; a++) _tables[a].Parameter = selector.Parameters[a];
|
||||
|
Reference in New Issue
Block a user