mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Adding constraints
This commit is contained in:
parent
c682714729
commit
7addc23a6f
@ -823,7 +823,10 @@ namespace SqlSugar
|
|||||||
public static void CheckArray<T>(T[] insertObjs) where T : class, new()
|
public static void CheckArray<T>(T[] insertObjs) where T : class, new()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (insertObjs != null && insertObjs.Length == 1 && insertObjs.FirstOrDefault().GetType().FullName.Contains("System.Collections.Generic.List`"))
|
if (insertObjs != null
|
||||||
|
&& insertObjs.Length == 1
|
||||||
|
&& insertObjs.FirstOrDefault()!=null
|
||||||
|
&& insertObjs.FirstOrDefault().GetType().FullName.Contains("System.Collections.Generic.List`"))
|
||||||
{
|
{
|
||||||
Check.ExceptionEasy("Insertable(T []) is an array and your argument is a List", "二次封装引起的进错重载,当前方法是 Insertable(T []) 参数是一个数组,而你的参数是一个List");
|
Check.ExceptionEasy("Insertable(T []) is an array and your argument is a List", "二次封装引起的进错重载,当前方法是 Insertable(T []) 参数是一个数组,而你的参数是一个List");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user