When I generate CRUD pages, or Grid pages, I'm getting a method call with empty parameter values for every page and I'm stumped as to what's causing it.
I created some pages against the Northwind DB (which I installed on the same server) and the code is generated without parameters. If I remove the parameter calls from my code, it code runs fine.
var simpletestSqlGetOrganisationsResult = await SimpletestSql.GetOrganisations(int.Parse($"{}"), int.Parse($"{}"));
(edit) I'm also getting this format:
var simpletestSqlGetDocumentQueuesResult = await SimpletestSql.GetDocumentQueues($"[object Object][object Object]", int.Parse($"{}"), int.Parse($"{}"));
From Northwind
var nwtestGetCustomersResult = await Nwtest.GetCustomers();
Its not a good fix but if you go and edit something on that page in Radzen IDE the parameters will be populated if i rembeber correctly. Iv got the same "error" a while ago
That did indeed solve the problem, although the parameters were removed rather than populated - nice catch and thank you!
I agree - it's not a great fix though. Even with just three tables I've got nine pages that need to be edited (or sets of code that need to be amended).
Radzen Team - does this need a bug report filed somewhere (where?) or do you pick up these issues from the forum?
I'm afraid that we are not sure how to reproduce this. All applications (including such from Northwind database) in our test environment can be scaffolded normally and the code generated on run works as expected.
Can I email you a sample sql script to generate a table (it's small - just three fields), but it's happening on every table I have. They're very similar in nature. DB is sql on Azure, tables are a non-DBO schema.
Later today I can probably hook up to an on-prem SQL db to see if the same happens.
So recently i found a bug when CRUD pages are generated from a datasoruce. There is sometimes unpopulated parameters in the datasource service functions called in the Load function on the generated CRUD page. This only occurs if there is more then one service call.
How to reproduce:
Create a new MS SQL Server datasource with the "Create sample Schema" button.
Here we can see that there is unpopulated parameters in the calls med after the first call. The first call is always correct. That we can see in the EditOrder.razor.designer.cs file. It only has one call and it is generated correctly.
If you go in Radzen IDE and go to a page that is generated wrong and click on the load handler and click done. The parameters are remove for that page.
If you go to the datasource you just created and click "infer schema" and press finish without checking the "Generate pages for CRUD operations" checkbox. The result is the same as saving the load handler as said above but the parameters are removed for all pages.
But if a developer run the project from Visual Studio? And to run the app from Radzen to "fix" this problem isnt a "fix" imo. Why does the bug occur in first place?
@Gottegubben we will review what's causing this wrong code generation however to make sure that you have the correct code generated you will need to run the application from Radzen. At the moment because of the designer there are partial code generations however we cannot run full application code generation since it will be very slow.