MVC REST API for Book database. It supports CRUD operations (HTTP Get, Post, Put, Patch, Delete) on Book objects. Book objects contain their title, author, genre and publisher data.
- Written in C#
- ASP.NET Core 5.0 (Entity Framework Core ORM)
- Microsoft SQL Server as RDBMS
- MVC design pattern
- Migration to create database schema within code
- Repository (Dependency Injection) to handle DbContext
- DTOs (Data Transfer Objects) to control visibilities of model properties
- Postman & Swagger to test API endpoint
Below depicts the whole application architecture of this project (created with draw.io)
- Clone this repo to your Windows machine
- Install .NET Core 5.0 SDK and SQL Server 2019
- Add a new user in your SQL Server and restart server
- Change
User IDandPasswordfields inappsettings.jsonto your credentials - Change IP address in
applicationURLfield fromProperties/launchSettings.jsonto localhost or your machine's IP - Run
dotnet ef database updateto migrate database - Run
dotnet runand visithttps://localhost/swagger/index.htmlon browser!
All contributions are welcome!
