在一次偶然使用includeAllEntities=false时,有些实体主键引用得Entity<guid>,没有使用聚合根FullAuditedAggregateRoot等,导致服务中注入这些仓储时,一直报错
配置如下:
实体如下
报错如下:
{
"error": {
"code": null,
"message": "An exception was thrown while activating Tzkj.GreenEnterprise.SupplyDemand.Demand.DemandController -> Tzkj.GreenEnterprise.SupplyDemand.DemandCollects.DemandCollectAppService.",
"details": "DependencyResolutionException: An exception was thrown while activating Tzkj.GreenEnterprise.SupplyDemand.Demand.DemandController -> Tzkj.GreenEnterprise.SupplyDemand.DemandCollects.DemandCollectAppService.\r\nSTACK TRACE: at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)\r\n at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)\r\n at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ct