Please share sample code for using SQL Server DB stored procedure accepting input params and returning multiple rows with Entity Framework COre.
Ours is a tiered application with Blazor Web Assembly as a UI framework with Entity Framework and SQL Server. • ABP Framework version: v5.3 • UI type: / Blazor Web Assembly • DB provider: EF Core • Tiered (MVC) : Yes • Identity Server Separated : yes
7 Answer(s)
-
0
You can check https://github.com/abpframework/abp-samples/tree/master/StoredProcedureDemo
-
0
-
0
hi
HTTP 500
Please check your app logs(Logs.txt)
-
0
Thanks, I'm getting below runtime exception due to dependency injection failure of new custom repository class of stored procedure - IDepartmentsInfoRepository in Application Service class constructor.
How to resolve custom repository dependency injection issue in application service class?
2023-03-30 13:19:18.003 +05:30 [ERR] An exception was thrown while activating Castle.Proxies.DepartmentAppServiceProxy. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Castle.Proxies.DepartmentAppServiceProxy. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Castle.Proxies.DepartmentAppServiceProxy' can be invoked with the available services and parameters: Cannot resolve parameter 'Departments.IDepartmentsInfoRepository DepartmentInfoRepository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], Volo.Abp.Domain.Repositories.IRepository`2[Departments.Department,System.Int32], Departments.IDepartmentsInfoRepository, Volo.Abp.Domain.Repositories.IRepository`2[Departments.DepartmentLOB,System.Int32], Microsoft.Extensions.Logging.ILogger`1[Departments.DepartmentAppService], Volo.Abp.Data.IDataFilter, Volo.Abp.Domain.Repositories.IRepository`1[Departments.FreightClassCode], Volo.Abp.Domain.Repositories.IRepository`2[Departments.SKIGenerationForSupply,System.Int32], Volo.Abp.Domain.Repositories.IRepository`2[Departments.SKIGenerationForPrepack,System.Int32], Volo.Abp.Domain.Repositories.IRepository`2[Departments.DepartmentAssortment,System.Int32], Volo.Abp.Domain.Repositories.IRepository`2[Departments.DepartmentLOB,System.Int32], Volo.Abp.Domain.Repositories.IRepository`2[Departments.SubVendor,System.Int32], Volo.Abp.Domain.Repositories.IRepository`1[Departments.DepartmentVendor], Shared.Lookups.ILookupService, Microsoft.Extensions.Localization.IStringLocalizer`1[Localization.SKIResource])'. at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 2023-03-30 13:19:18.003 +05:30 [ERR] ---------- Exception Data ---------- ActivatorChain = Castle.Proxies.DepartmentAppServiceProxy
-
0
What's the class name that implement the
IDepartmentsInfoRepository
?It must be
EfCoreDepartmentsInfoRepository
. -
0
I tried renaming the class getting same exception
-
0
Please share a simple project. thanks
liming.ma@volosoft.com