Is there a way to create folders in wwwroot when the application startup?
Perhaps in the startup.cs class?
I know how to create folders in wwwroot in controller action methods. I do not want this.
This is what I would like:
- I have a List of Objects:
List<Organization> Organizations foreach (Organization in Organization)I want a folder with theOrganization.Namecreated in thewwwrootfolder- I would like it to be created at the moment the application is launched
Thanks in advance you for any help
you can use the following
but please note that you have duplicate variable names in your foreach