This project is a software for simplified registration of tasks that a person needs to perform. This project serves as a study object and an application of best practices. On the frontend, the project uses HTML, Bootstrap CSS, and vanilla JavaScript, with minimal use of external libraries. On the backend, C#.NET is used, and SQL Server is used for the database.
The project is divided into two parts: the backend, written in C#.net and accessing a SQL Server database, and the frontend, which uses HTML, CSS, and vanilla JavaScript.
Since this solution involves initialization in more than one project, the following command line should be used to build the database.
-
The line command to create a migration is:
add-migration DbInit -Context TodoContext -Project Todo.Infra.Database -StartupProject Todo.API -
The line command to create a database is:
update-database -Context TodoContext -Project Todo.Infra.Database -StartupProject Todo.API
-
Select Todo.Core project;
-
Open the Packag Manager Console panel and type the follow code:
** Entity Framework line commands to create database with specific path to migrations folder.
- Init database: add-migration Init -outputdir "Models/DataBase/Migrations"
update-database -verbose
- Creates a UserPicture entity with relationship to User. add-migration AddPictureInUser -outputdir "Models/DataBase/Migrations"
update-database -verbose
PS: to remove the last migration file, run this command in Packag Manager Console:
remove-migration


