We need to build a configuration manager for all the settings the application has.
- This will be built in RDN.Raspberry.
- You need to create a new table called Site_Configuration that will attach to a class called SiteConfiguration.
- The database portion of this along with the datacontext and models will be built within Common.Site project. RDN.Raspberry will reference the project.
- You are free to copy and replace code from the Common.EmailServer.Library.Database.Context and Base name spaces.
- You will need to create the following columns Id (Seed), Key (The Name of the configuration property), Value (the value of the property), Description. This should be created from the SiteConfiguration Class.
- The class should inherit from a new base class called InheritDb which can also be copied from the common.emailserver library.
- You should create a new page on RDN.Rasperry called configuration.
- The configuration page should display all the results of the configuration table in the database. You should be able to add, EDIT and DELETE a configuration property.
- When a delete occurs, you should only soft delete the property. Meaning, you should set the flag IsRemoved == true within the InheritDb class.
- You need to use the EntityFramework and Code First migrations to create this table.
- RDN.DBUpdate is your migrating project, so you can add the new context and configuration to the RDN.DbUpdate.Migrations.Configuration Class.
- An example of the confuration and migrations can be seen as the CEmail class in the configuration file.
- You should build a manager class in Common.Site to manage all the properties/access/delete/get from the database.
After you are finished with this update, you will need to take ALL the properties from LibraryConfig (in RDN.Library) and access the new database table from that class. Do not delete the class, just change how the class receives its configurationproperties.