Base solution for your next web application
Open Closed

Feature provider setup #3007


User avatar
0
okeziestanley created

Good day all I am working with features in abp and according to this document <a class="postlink" href="https://www.aspnetboilerplate.com/Pages/Documents/Feature-Management">https://www.aspnetboilerplate.com/Pages ... Management</a> you can create features by implementing a custom feature provider, but can you only hard code features? What if I want to read/write features from the database, how can I do that. Also I checked some code on [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Application/Features/FeatureManager.cs]) and found this

public void Initialize()
        {
            foreach (var providerType in _featureConfiguration.Providers)
            {
                using (var provider = CreateProvider(providerType))
                {
                    provider.Object.SetFeatures(this);
                }
            }

            Features.AddAllFeatures();
        }

Please, when and where is this method invoked. Thanks


2 Answer(s)
  • User Avatar
    0
    okeziestanley created

    I am still trying to figure this out. Somebody please help

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This method is called here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/AbpKernelModule.cs#L78">https://github.com/aspnetboilerplate/as ... ule.cs#L78</a>.

    You can read features from DB but in your code you need to check features by their unique name.