Possible Error with AutoGen Services? #117
-
Hi, I'm trying to generate c# classes and autoquery services following the tutorial here after creating a new project with "x new empty AutoGenTest" and running "x mix autoquery postgres" and correctly configuring the DbConnectionFactory, and adding the following :
I run into a problem where both DbFactory and ServiceStackHost.Instance are null on line 767 of GenerateCrudServices.cs :
I can overcome this by manually setting the DbFactory property on the GenerateCrudServices instance - and that allows me to correctly generate the AutoQuery services from the database (which I can see in the API Explorer by setting AutoRegister = true). however - when I try to generate the code (either by running 'x csharp https://localhost:5001 -path /crud/all/csharp' from the command line or visiting 'https://localhost:5001/crud/all/csharp') I get a 405 : method not allowed error : Is this something you guys are aware of, or can suggest a workaround for? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sounds like you're using the newer templates with Endpoint Routing, which was missing the |
Beta Was this translation helpful? Give feedback.
Sounds like you're using the newer templates with Endpoint Routing, which was missing the
IGet
Verb marker to register it as a GET Endpoint route. Can you try with the latest v8.2.3 Pre Release packages?