The purpose of this project is to integrate management feautures on users for the application.
To be able to work in this project, you'll need docker. Docker will handle all the dependancies that are tied in to this project. This will also provide you the free choice of using whatever text editor / IDE you like.
Running this project is really simple now. Doesn't matter where you are, what computer you have, as long as it has Docker installed on it you can easily work in this project.
To run this project, you need to open a CLI (Or whatever code editor you want to use, IDE Visual Studio works aswell) and navigate to the project folder. When there, enter the following code:
docker-compose up
That's the only thing you'll need to do and it'll run the project.
This project uses a local MySQL database that runs in a docker container. This database is created from migrations that are defined in the app. The app also seeds the database with some standard values.
You can connect with the local database via localhost on port 3306, but make sure that the mysql container is running in docker! The credentials for this db is as follows:
These credentials are, ofcourse, different and serializeed in the production environment and are only used for local testing.
You can also access the database via the browser. This can be accessed via http://localhost:8080/.
Working with the entity framework requires following a set procedure. The database is built up from migrations that are defined through the entity framework. To include a new table/object in the database, you'll have to do the following:
1. Create an object class in the ./Models/ folder
2. Include the object in ./Data/AdminManagementContext.cs
public DbSet<MODELNAME> MODELNAME { get; set; }
3. (OPTIONAL) Insert default entries in ./Data/DbInitializer.cs
context.MODELNAME.Add( new MODELNAME( arguments[] ) )
4. Create the migration in the CLI
dotnet ef migrations add MIGRATIONMESSAGE
If done correctly, a success message should appear and rebuild the database on the next run.