Do you have a example of an aspnetzero plugin that can reference Application.Shared dll for interfaces and load the service di dependency injection for use in the plugin?
I have been working on this, and it compiles, and i can step thru the plugin logic. In the constructor i use dependency injection to populate the private readonly service property.
In my plugin method i can display the service property and it successfully populated, but if I step into a method on the service property, the application returns from my method without calling the app service method or any code after it. It appears if something is hiding an exception as no error's are produced. I have tried this with my own appservices and the out of the box tenantAppService and same results. If i use the repos directly without going thru the app service it works as well. But i would rather use the app service to ensure no code duplication from having some code targeting repos and some targeting services....
Any ideas you have on what the issue could be would be helpful, but an example plugin project would be amazing!
The application is Using AspNet Core Angular 13.2
Below is a simple example of the issue.
In review of the blog post: https://aspnetzero.com/blog/modular-monolith-with-asp.net-zero
Is there an angular version of this? Or can one be created?
I have been attempting this for some time and have not been able to settle on the best approach.
Thanks for any help with this.
In power tools templates, there are variables called "{{NP_Foreign_Entity_Name_Here}}" and "{{nP_Foreign_Entity_Name_Here}}".
Is there a plural version of these?
if so what are the variable names for them?
If not, can it be added?
These would be a big help to streamlining my development process.
When adding a new master detail property to an existing entity, the process fails to generate code.
From looking into the issue it is related to the entity.json data being saved at the beginning of the file generation.
It appears there is a string concatenation issue related to the IsGeneratedByMasterpage property.
Here is an idea to make ASPNetZero template generation much more flexible!
What if an entity, a property, a navigation property, etc.) all had an extra named valued pair collection that could be managed via power tools. This would allow to store custom configuration information specific to an object that could be used in custom templates.
If the UI was added to power tools, the engine could uses its data to auto create replacement / expression variables. This would add tremendous extensibility to the current system, I hope you like it, and implement it!
In power tools when an entity has more than one navigation property pointing to the same entity it uses the "Duplication Number" to uniquely identify the property.
This part is working as expected, but during the generation of the module.ts it lists the lookup module for each property, creating duplicate import and module decatenations.
I have tried to fix this in my template and have it some what working, but I am having trouble with the condition.
I am trying to target only the first lookup for each entity using the duplication number of 0 using the condition below
"condition": "{{NP_Duplication_Number_Here}} == X",
For "X" I have tried various values from '', "", 0, <1 but none of these work. (Even the escaped versions)
If I use the value of 2 and have enough properties defined it does target the second property, and no duplicates are generated.
How do I target the 0 or blank with a condition?
Below is a sample of the NavigationPropertyTemplates
In power tools when creating an entity we have the ability to specify if a property is on the list & and is in the create update screen.
Why can't you specify what properties are on the view only screen?
When looking at the API the endpoint is there for returning a single view only object, but it is not being used in the power tools templates.
It does use the API when loading the create / edit views just not the view only ones.
In my case i have a grid that displays 8 columns but the underlying entity has about 50 properties.
These are all visible and working on the create edit screen, but the view only screen only shows the 8 properties that are visible in the list.
I can update my code to call the API to fix it, but wanted to report that this was happening in case it is a bug or something that was over looked.
Makes me think that there should be a "ViewDtoClass" template that contains all the fields from create or edit (or have a way to specify view only fields).
This class should be used in the result of the GetEntityForView API call.
And the angular template should be setup to make an API call to the GetEntityForView endpoint when the view button is selected..
Is there a way to have the enum based properties to auto refresh on application start?
I have used the power tools to generate some screens, but if the enum is updated in code the select items on the create edit, and filters need to be updated.
I can also update these and everything works, but It would be much nicer if these could be bound to a something that auto refreshed on app start or at least with running nswag.
I read in the documentation that there is a way to run power tools from the command line.
What is the recommended way of doing this?
Also is there any additional documentation for customizing power tools than: https://docs.aspnetzero.com/en/common/latest/Development-Guide-Rad-Tool
This was a great help in understanding the tool, but looking to extend it to support multiple layers of N2M relationships.
From someone that understands the difference of "nP_OneTwoMany_EntityNamePlural_Here" vs "NP_OneTwoMany_EntityNamePlural_Here" from self analysis.
Any additional information would be greatly appreciated.