Skip to content

C# and SQLServer backend REST-ful web API for minimal Record Shop web application

License

Notifications You must be signed in to change notification settings

rsdc2/cs-record-shop

Repository files navigation

RecordShop

This project provides a minimal backend API for a record shop using ASP.NET Core and SQLServer.

Run and test in Visual Studio (2022)

Load RecordShop.sln in Visual Studio, from where the project can be run and tested using Visual Studio's user interface.

Running from the commandline

  1. Clone or download the repository.
  2. cd into the repo folder:
cd cs-record-shop
  1. cd into the RecordShop project.
cd RecordShop
  1. Run the project:
dotnet run

This will build and run the project. Among the messages that appear in the console will be one providing the address on which the server is listening, e.g.:

info:   Microsoft.Hosting.Lifetime[14]
        Now listening on: http://localhost:<PORT> 

where <PORT> stands for a four digit port number, that will be needed for subsequent steps.

Accessing in a browser

  1. In a browser, navigate to:
http://localhost:<PORT>/Albums

This will display a list of albums in the database. Using the browser alone it will only be possible to access data in the database: it will not be possible to modify the data.

Accessing via the Swagger interface

  1. In a browser, navigate to:
http://localhost:<PORT>/swagger/index.html

This will provide the possibility of submitting the full range of GET, POST, PUT and DELETE requests.

Run the tests from the commandline

  1. cd into the tests folder in the repo:
cd cs-record-shop/RecordShop_Tests
  1. Run the tests with:
dotnet test

Acknowledgements

Context

The project was written as a learning exercise as part of the Northcoders software development bootcamp.

Dependencies and licenses

The main project has no third-party dependencies beyond those required for ASP.NET and Entity Framework (working with SQLServer).

The test project depends on:

For license texts, see under LICENSES/.

About

C# and SQLServer backend REST-ful web API for minimal Record Shop web application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages