Optimization error prompt

This commit is contained in:
sunkaixuan 2023-06-09 01:45:29 +08:00
parent f13035db24
commit ebd73bb9b9

View File

@ -16,6 +16,7 @@ namespace SqlSugar
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, TChild>> expression) where TChild : class, new()
{
Check.ExceptionEasy(typeof(TChild).FullName.Contains("System.Collections.Generic.List`"), " need where T: class, new() ", "需要Class,new()约束并且类属性中不能有required修饰符");
this.Context = insertNavProvider._Context;
insertNavProvider.NavContext = this.NavContext;
InsertNavTask<Root, TChild> result = new InsertNavTask<Root, TChild>();
@ -39,6 +40,7 @@ namespace SqlSugar
public InsertNavTask<Root, TChild> Include<TChild>(Expression<Func<Root, TChild>> expression,InsertNavOptions options) where TChild : class, new()
{
Check.ExceptionEasy(typeof(TChild).FullName.Contains("System.Collections.Generic.List`"), " need where T: class, new() ", "需要Class,new()约束并且类属性中不能有required修饰符");
this.Context = insertNavProvider._Context;
insertNavProvider.NavContext = this.NavContext;
InsertNavTask<Root, TChild> result = new InsertNavTask<Root, TChild>();