System.Exception: FreeSql: FluentBlazorApp.Components.Pages.Counter.Tag Compilation error: Exception has been thrown by the target of an invocation.
using System;
using FreeSql.DataAnnotations;
using System.Collections.Generic;
using System.Linq;
public class FreeSqlLazyEntity__FluentBlazorApp_Components_Pages_Counter_Tag : FluentBlazorApp.Components.Pages.Counter.Tag {
private IFreeSql __fsql_orm__ { get; set; }
private bool __lazy__Parent = false;
public override FluentBlazorApp.Components.Pages.Counter.Tag Parent {
get {
if (base.Parent == null && __lazy__Parent == false) {
var loc3 = __fsql_orm__.Select<FluentBlazorApp.Components.Pages.Counter.Tag>().Where(a => a.Id == this.Parent_id).ToOne();
base.Parent = loc3;
__lazy__Parent = true;
}
return base.Parent;
}
set {
base.Parent = value;
if (value != null) __lazy__Parent = true;
}
}
}
at FreeSql.Internal.Utils.GetTableByEntity(Type entity, CommonUtils common)
at FreeSql.Internal.Utils.AddTableRef(CommonUtils common, TableInfo trytb, PropertyInfo pnv, Boolean isLazy, NativeTuple`5 vp, StringBuilder cscode)
at FreeSql.Internal.Utils.GetTableByEntity(Type entity, CommonUtils common)
at FreeSql.Internal.CommonUtils.GetTableByEntity(Type entity)
at FreeSql.Internal.CommonProvider.InsertProvider`1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression)
at FreeSql.Duckdb.Curd.DuckdbInsert`1..ctor(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression)
at FreeSql.Duckdb.DuckdbProvider`1.CreateInsertProvider[T1]()
at FreeSql.Internal.CommonProvider.BaseDbProvider.Insert[T1]()
at FreeSql.Internal.CommonProvider.BaseDbProvider.Insert[T1](T1 source)
at FluentBlazorApp.Components.Pages.Counter..cctor() in C:\Users\wm537\source\repos\FluentBlazorApp\FluentBlazorApp\Components\Pages\Counter.razor:line 41
--- End of inner exception stack trace ---
at lambda_method118(Closure, IServiceProvider, Object[])
at Microsoft.AspNetCore.Components.DefaultComponentActivator.CreateInstance(Type componentType)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.ResolveComponentForRenderMode(Type componentType, Nullable`1 parentComponentId, IComponentActivator componentActivator, IComponentRenderMode renderMode)
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType, IComponentRenderMode callerSpecifiedRenderMode, Nullable`1 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.BeginRenderingComponent(IComponent component, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.RenderEndpointComponent(HttpContext httpContext, Type rootComponentType, ParameterView parameters, Boolean waitForQuiescence)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.<>c__DisplayClass1_1.<<AddInteractiveServerRenderMode>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
应该是CS-Script.Core库引起的,该库比较旧,是否考虑换成 CS-Script 版本
数据库版本
FreeSql.Provider.Duckdb 3.5.307
安装的Nuget包
FreeSql 3.5.307
FreeSql.Extensions.LazyLoading 3.5.307
FreeSql.Provider.Duckdb 3.5.307
.net framework/. net core? 及具体版本
.net10