Base solution for your next web application
Open Closed

Removing modules like chat #4777


User avatar
0
ferventcoder created

I see in the developer's guide it mentions how to configure each of the modules. I think it might be beneficial to document how to turn off and remove modules properly.

As it stands we are going to:

  • Add a migration to turn it off
  • Remove the code sections and controllers
  • Remove any NuGet packages for this

It would be good to see documentation on how to perform this aspect correctly (and apologies if it is there already, I'm still reading through). If this already exists, it might be helpful to at least mention and link to it from the developer's guide.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ferventcoder,

    In current design of AspNet Zero, features are not designed like modules, so it is not easy to remove a future. Like you explained, you need to

    • remove related entities first
    • Add a migration
    • remove module related codes from your app.
    • remove related nuget packages.

    Another alternative way would be disabling the usage with a permission of future. If you are not going to use a feature now but you might be using it in the future, you can define a future (if you want to disable it for tenants) or a permission (if you want to disable it for users) and modify the code accordingly. If the feature/permission is enabled/granted you can show the related UI parts.

    You can also use both feature and permission together. This allows you to disable/enable features both for tenants and users.