Update error message

This commit is contained in:
sunkaixuan 2023-06-09 01:43:03 +08:00
parent 93247ebd90
commit f13035db24

View File

@ -184,7 +184,7 @@ namespace SqlSugar
public IInsertable<T> Insertable<T>(T insertObj) where T : class, new()
{
Check.Exception(typeof(T).FullName.Contains("System.Collections.Generic.List`"), " need where T: class, new() ");
Check.ExceptionEasy(typeof(T).FullName.Contains("System.Collections.Generic.List`"), " need where T: class, new() ","需要Class,new()约束并且类属性中不能有required修饰符");
if (typeof(T).Name == "Object")
{
Check.ExceptionEasy("Object type use db.InsertableByObject(obj).ExecuteCommand()", "检测到T为Object类型请使用 db.InsertableByObject(obj).ExecuteCommand()Insertable不支持objectInsertableByObject可以(缺点:功能比较少)");