mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 21:32:04 +08:00
Update Core
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
@@ -231,6 +232,17 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public IDeleteable<T> In<PkType>(PkType primaryKeyValue)
|
public IDeleteable<T> In<PkType>(PkType primaryKeyValue)
|
||||||
{
|
{
|
||||||
|
if (typeof(PkType).FullName.IsCollectionsList())
|
||||||
|
{
|
||||||
|
var newValues = new List<object>();
|
||||||
|
foreach (var item in primaryKeyValue as IEnumerable)
|
||||||
|
{
|
||||||
|
newValues.Add(item);
|
||||||
|
}
|
||||||
|
return In(newValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
In(new PkType[] { primaryKeyValue });
|
In(new PkType[] { primaryKeyValue });
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,9 @@ namespace SqlSugar
|
|||||||
if (golbalMappingInfo != null)
|
if (golbalMappingInfo != null)
|
||||||
column.IsIgnore = true;
|
column.IsIgnore = true;
|
||||||
}
|
}
|
||||||
|
if (this.Context.CurrentConnectionConfig.ConfigureExternalServices != null && this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService != null) {
|
||||||
|
this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService(property, column);
|
||||||
|
}
|
||||||
result.Columns.Add(column);
|
result.Columns.Add(column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
namespace SqlSugar
|
namespace SqlSugar
|
||||||
@@ -90,5 +91,8 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public List<SqlFuncExternal> SqlFuncServices { get; set; }
|
public List<SqlFuncExternal> SqlFuncServices { get; set; }
|
||||||
public List<KeyValuePair<string, CSharpDataType>> AppendDataReaderTypeMappings { get; set; }
|
public List<KeyValuePair<string, CSharpDataType>> AppendDataReaderTypeMappings { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Action<PropertyInfo, EntityColumnInfo> EntityService{ get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public static bool IsCollectionsList(this string thisValue)
|
public static bool IsCollectionsList(this string thisValue)
|
||||||
{
|
{
|
||||||
return (thisValue + "").StartsWith("System.Collections.Generic.List");
|
return (thisValue + "").StartsWith("System.Collections.Generic.List")|| (thisValue + "").StartsWith("System.Collections.Generic.IEnumerable");
|
||||||
}
|
}
|
||||||
public static bool IsStringArray(this string thisValue)
|
public static bool IsStringArray(this string thisValue)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user