A Sample Application to demonstrate working with NoSQL via MongoDB from an Angular Front-end with ASP.NET Core backend. This solution helps you to quickly get started working with MongoDB database integration in ASP.NET Core, all while following the best practices and a Clean Architecture.
MongoDB is an open-source cross platform document-oriented database. It stores data records in the form of JSON-like structures and is classified as a NoSQL data store. It also supports scalability and replication and is one of the most popular options for NoSQL data store usecases.
This solution helps you get a clear picture about how to configure and connect to any MongoDB server/database and perform basic CRUD operations. The solution is built using Angular SPA hosted in ASP.NET Core so that you can find the solution in action just by running it.
- Layered architecture with seperated UI, Core and Contracts libraries
- DB Interactions built using Repository pattern and follows all SOLID principles
- Angular UI which facilitates CRUD operations performed over the database
- API validates payload using Fluent Validations
- Docker scripts included making the solution container deployment ready
- One command setup using Docker-Compose, file included
- Install the latest .NET 6 SDK
- Install the latest Node.js LTS
- Navigate to ./MongoBookStoreApp.Web/ClientApp and run npm install
- Navigate to ./MongoBookStoreApp.Web/ClientApp and run npm start to launch the front end (Angular)
- Navigate to ./MongoBookStoreApp.Web/ and run dotnet run to launch the back end (ASP.NET Core Web API)
To run the application through docker, pull the solution into your local directory and run the below command in your Terminal / Command-Line (requires a working Docker installation and Docker running)
> docker-compose up --force-recreate --build
Once the container is up, visit http://localhost:5000 in your local browser. You should see the application running as below:
If you face any issues or would like to drop a suggestion,
Leave a Star if you find the solution useful. If you find the article helpful, support me by:
For more detailed articles and how-to guides, visit https://referbruv.com