To run the Stadium Analytics application locally, follow these steps:
-
Download the project files to your local machine.
-
Navigate to the project directory using your preferred file explorer or command line.
-
Install dependencies:
dotnet restore
-
Execute the SQL create file SensorDataDB.sql to create the necessary database tables. You can use a SQL Server management tool (e.g., SSMS) or the command-line tool to execute the SQL script.
-
Configure the database connection:
- Open the
appsettings.json
file. - Update the
ConnectionStrings
section with your SQL Server connection string.
- Open the
-
Run the console application SensorEventTracker to add the sensor events to SQL DB. Please follow the console help. It has publisher & subscriber implementation to add new Sensor event to DB
-
Run StadiumAnalytics Web API application and test the Get API using Swagger UI. The API fetches the total number of people entered or exited for a given date time duration.
-
Sensor Data has common interfaces & Classes defined.