Browse Source

Optimization error prompt

pull/33/head
sunkaixuan 1 year ago
parent
commit
ebd73bb9b9
  1. 2
      Src/Asp.NetCore2/SqlSugar/Abstract/ExecuteNavProvider/InsertNavTask.cs

2
Src/Asp.NetCore2/SqlSugar/Abstract/ExecuteNavProvider/InsertNavTask.cs

@ -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>();

Loading…
Cancel
Save