Plugin development TableMap

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
Hi all,
I'm developing a plugin that provides data access to an 3rd party table (not a nop one) and I'm having trouble debugging it.
I keep getting :-
An error occurred when trying to create a controller of type 'Nop.Plugin.Data.####.Controllers.StockController'. Make sure that the controller has a parameterless public constructor.

I have determined that this error is generic and seems to be caused by something in my StockService. The StockMap.cs could be where the problem is as the table has a composite PK but I'm not sure and my experiments have yet to solve it.

My question is, rather than just trying to narrow down but experimenting and ruling out problems with the code; Is there a technique that I can use to debug more efficiently? The stacktraces I get from these plugin / repository / DI type errors are generally not very useful.

Disclaimer: I've previously developed data access plugins that have worked correctly however these were created from scratch with conventional naming / PK standards.

Thanks,
Greg
12 năm cách đây
Well I found my error. It was a copy paste error when building up the DependancyRegistrar.cs where I registered the wrong type.
But the question still remains - is there a better way to find these errors?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.