Base solution for your next web application
Open Closed

Rad Error On Unit Test For Non CreateOrUpdate Properties and Nullable Filters #12424


User avatar
0
sailoper created

The RAD Tool currently generates CreateOrEdit*** classes with all Listed properties instead of just the necessary Create/Update properties. It’s not a major issue — we can manually remove the unnecessary ones — but automating this could improve efficiency.

One potential fix is updating the condition in AspNetZeroRadTool\FileTemplates\Test\UnitTest\PartialTemplates.txt. Replace "placeholder": "{{Seed_Updated_Value}}", "condition": "{{Property_Listed_Here}} == true", With: "placeholder" : "{{Seed_Updated_Value}}", "condition" : "{{Property_CreateOrEdit_Here}} == true", This might resolve the problem and limit the generated properties accordingly.

Additionally, the tool generates non-nullable filter properties for related navigation entities marked as non-nullable. However, during filtering, it tries to check their .Value, which causes errors when they’re not assigned. This could be improved by:

Making such filter properties nullable (e.g., int? instead of int)

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @sailoper

    Thank you for your feedback. I have created an issue for this. You can follow the updates here. Have a great day.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    sailoper created

    I can not see the issues , why?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @sailoper

    After logging in with the user who has the plan on the aspnetzero.com website, clicking the manage button under the Account button, you can give permission to the github user you are trying to log in from the Github Members tab on the relevant page.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)