mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-19 06:29:33 +08:00
Synchronization code
This commit is contained in:
parent
9065c6bc71
commit
a91e720fab
@ -468,7 +468,10 @@ namespace SqlSugar
|
||||
totalPage = (totalNumber + pageSize - 1) / pageSize;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Dictionary<string, ValueType> ToDictionary<ValueType>(Expression<Func<T, object>> key, Expression<Func<T, object>> value)
|
||||
{
|
||||
return this.ToDictionary(key, value).ToDictionary(it => it.Key, it => (ValueType)UtilMethods.ChangeType2(it.Value, typeof(ValueType)));
|
||||
}
|
||||
public Dictionary<string, object> ToDictionary(Expression<Func<T, object>> key, Expression<Func<T, object>> value)
|
||||
{
|
||||
if (this.QueryBuilder.IsSingle() == false && (this.QueryBuilder.AsTables == null||this.QueryBuilder.AsTables.Count==0))
|
||||
|
@ -573,7 +573,10 @@ ParameterT parameter)
|
||||
result = result.Where(it => it.GetType().GetProperty(name).GetValue(it).ObjToString() == pkValue.ObjToString()).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, ValueType>> ToDictionaryAsync<ValueType>(Expression<Func<T, object>> key, Expression<Func<T, object>> value)
|
||||
{
|
||||
return (await this.ToDictionaryAsync(key, value)).ToDictionary(it => it.Key, it => (ValueType)UtilMethods.ChangeType2(it.Value, typeof(ValueType)));
|
||||
}
|
||||
public async Task<Dictionary<string, object>> ToDictionaryAsync(Expression<Func<T, object>> key, Expression<Func<T, object>> value)
|
||||
{
|
||||
if (this.QueryBuilder.IsSingle() == false && (this.QueryBuilder.AsTables == null || this.QueryBuilder.AsTables.Count == 0))
|
||||
|
@ -216,8 +216,10 @@ namespace SqlSugar
|
||||
List<T> SetContext<ParameterT>(Expression<Func<T, object>> thisFiled1, Expression<Func<object>> mappingFiled1, Expression<Func<T, object>> thisFiled2, Expression<Func<object>> mappingFiled2, ParameterT parameter);
|
||||
Task <List<T>> SetContextAsync<ParameterT>(Expression<Func<T, object>> thisFiled, Expression<Func<object>> mappingFiled, ParameterT parameter);
|
||||
Task<List<T>> SetContextAsync<ParameterT>(Expression<Func<T, object>> thisFiled1, Expression<Func<object>> mappingFiled1, Expression<Func<T, object>> thisFiled2, Expression<Func<object>> mappingFiled2, ParameterT parameter);
|
||||
Dictionary<string, ValueType> ToDictionary<ValueType>(Expression<Func<T, object>> key, Expression<Func<T, object>> value);
|
||||
Dictionary<string, object> ToDictionary(Expression<Func<T, object>> key, Expression<Func<T, object>> value);
|
||||
Task<Dictionary<string, object>> ToDictionaryAsync(Expression<Func<T, object>> key, Expression<Func<T, object>> value);
|
||||
Task<Dictionary<string, ValueType>> ToDictionaryAsync<ValueType>(Expression<Func<T, object>> key, Expression<Func<T, object>> value);
|
||||
List<Dictionary<string, object>> ToDictionaryList();
|
||||
Task<List<Dictionary<string, object>>> ToDictionaryListAsync();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user