an API User Order with ASP.NET Core
- CRUD User
- ASP.NET Core API
- SQL Server
- Entity Framework
- Fluent Validation
- Swagger
- Clone the repository:
git clone https://github.com/umiatiyah/UserOrdersAPI.git
- Setup appsettings.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=(local)\\SQLEXPRESS;Database=UserOrderDb;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True;"
}
}
- Migration database: to migrate the database and tables can use ef migrations or run the query in file querymigration.sql
dotnet ef migrations add UserOrderMigration
dotnet ef database update
CREATE DATABASE UserOrderDb
USE UserOrderDb
then open file querymigration.sql and execute it.
dotnet run
- Author: @umiatiyah