Web application developed for condominium management. [Under development]
This application was developed in .NET Core, using Entity Framework and Razor Page.
Installing dependencies:
dotnet tool install --global dotnet-ef
dotnet tool install --global dotnet-aspnet-codegeneratorAdding dependencies to csproj.
dotnet add package Pomelo.EntityFrameworkCore.Mysql
dotnet add package Pomelo.EntityFrameworkCore.MySql.Design
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.VisualStudio.Web.CodeGenerators.Mvc
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.DesignIn this project we use MySQL as the database. Make sure you have it running on your machine. Otherwise, you can upload an instance to Docker for use with the command below:
docker run -p 3306:3306 --name mysql-database -e MYSQL_ROOT_PASSWORD={PASSWORD} -d mysql
| Environment Variables | Description |
|---|---|
MYSQL_ROOT_PASSWORD |
Password for the database root user. |
Access your database and create a database called qaccess
Having an instance of the database running, we need to configure it in the appsettings.json file.
Change a DefaultDatabase property according to your database access.
"ConnectionStrings": {
"DefaultDatabase": "server=localhost; database=qaccess; user=root; password=4?lm@ei?D&A",
"QaccessContext": "Server=(localdb)\\mssqllocaldb;Database=;Trusted_Connection=True;MultipleActiveResultSets=true"
}| Properties | Description |
|---|---|
server |
Database execution address. |
database |
Name of the previously created database.. |
user |
User to access the database. |
password |
User password.. |
Before running the application, run the dotnet command below to create the tables in our database
dotnet-ef migrations add CreateTablesUpdate the database:
dotnet-ef database updateMake the build:
dotnet buildRun the application:
dotnet runAccess:
localhost:5000
The application will be running on port 5000. You can change this by changing the property in the launchSettings.json file