Data is downloaded from Kaggle as csv and stored in nbaplayerdb in MySql
Use a docker instance in wsl or Linux or windows docker desktop and install an instance of mysql Connect to the instance using MySql workbench
- crate the database nbaplayerdb
create database nbaplayerdb;
- right click on nbaplayerdb and select
table data import wizard
- browse the file path and select the file
- the table will be created with the same name as file name and data will auto imported to that table
Run the asp dotnet core application using visual studio as IIS Profile or command line by
- Move inside directory PlayerAPI using
cd ./PlayerAPI
- run
dotnet run --launch-profile "NBAPlayerApi"
it will run at localhost 7118 as this port is configured inside Properties/launchSetting.json
or run it in docker container use the localhost:port of the server running for the api call, eg web api is running on localhost:44384 in IIS Profile using visual studio
Add the MySql connection string in appsetting.json for local setup or use key vault if needed or secret.json file
https://localhost:44384/api/players/{playerId}
-> fetches the player data for that particular Id
https://localhost:44384/api/players
-> fetches all players data (this is time intensive and memory expensive when data set is large)
https://localhost:44384/api/players/stream
-> fetches all players data as async stream this is efficient
EfCore with MySql is used as ORM for CRUD operation