A simple RESTful API for managing your music collection, built with ASP.NET using Entity Framework and SQL Server.
- Clone the repository to your local machine:
git clone https://github.com/AlexKoulel/MusicCollectionAPI
- Open the solution in Visual Studio.
- Inside appsettings.Development.json, update the Server value in the MusicCollectionDB connection string to match your server name.
- Run the program and use either Postman or your own custom JSON requests.
- Example POST request:
POST http://localhost:5000/albums Content-Type: application/json { "title": "Prequelle", "artist": "Ghost", "genreId": 2, "releaseDate": "2018-06-01", "formatId": 1 }
- Example POST request:
- Ensure the backend is running.
- Open a terminal and navigate to the
frontend
folder of the project. - Install the required dependencies by running the following command:
npm install
- Start the frontend development server with the command:
npm run dev
- Once the server is up, open the localhost URL displayed in the terminal.
- The page should load in your browser, resembling the following example:
Method | Endpoint | Description |
---|---|---|
GET | /albums |
Get all albums |
GET | /albums/{id} |
Get album by ID |
POST | /albums |
Add a new album |
PUT | /albums/{id} |
Update an existing album |
DELETE | /albums/{id} |
Delete an album |
Method | Endpoint | Description |
---|---|---|
GET | /genres |
Get all genres |
GET | /genres/{id} |
Get genre by ID |
POST | /genres |
Add a new genre |
PUT | /genres/{id} |
Update an existing genre |
DELETE | /genres/{id} |
Delete a genre |
Method | Endpoint | Description |
---|---|---|
GET | /format |
Get all formats |
GET | /format/{id} |
Get format by ID |
POST | /format |
Add a new format |
PUT | /format/{id} |
Update an existing format |
DELETE | /format/{id} |
Delete a format |