Table of Contents
This is a Web API for handling basic information in the Rocco company.
This Web API has build using ASP.NET Core Web API using .NET 6.0.
Some of the Nuget Packages used here are:
- Entity Framework Core for SQL Server
- Autommaper
- Serilog
- Fluent Validation
- Newtonsoft
- Swashbuckle
Here some steps to run the application
- Visual Studio 2020
- SDK .NET 6
- SQL Server Express 2019 or other version will works.
To start using the application you should.
-
Clone the repo.
git clone https://github.com/helibertoarias/Rocco.git
-
Open the solution Rocco.sln and build to restore the Nuget Packages.
-
Set the project Rocco.Web.API as startup project.
-
Open the file ./Rocco.Web.API/appsettings.json and update the user and password.
"ConnectionStrings": { "RoccoConnectionString": "Server=localhost;Database=Rocco;User Id=<user>;Password=<password>"
-
In VS 2020 open a new terminal and create the database for the application and the users.
Update-Database -Context RoccoContext Update-Database -Context RoccoIdentityContext
-
After this you can run the application. The Swagger page will show up https://localhost:36000/swagger/index.html
-
To validate the Web API you need to import the file Rocco Company.postman_collection into POSTMAN and run the test collection. Here some screenshots.
- Select the imported file and hit the Run button.
- After a seconds you should the test result all passed.
- An extra end point was added in order to provide a random number from an external web service. You can access from this URL https://localhost:7098/api/Random/getrandom
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
Heliberto Arias - @helibertoarias - [email protected]
Project Link: https://github.com/helibertoarias/RoccoSolution