The service contains endpoints for the following functions.
-
Submit a message to a defined receiver.
-
Fetch new messages.
-
Fetch messages for a range.
-
Delete a message.
-
Delete multiple messages.
The service is implemented in the form of REST API
To start, clone the repository to the local machine using the following command:
git clone https://github.com/Sunita76/MessageHandlingAPI.git
Or, download the ZIP file of the repository from GitHub and extract it to a local folder.
Navigate to the folder where you cloned the repository and select the .sln file to open it in Visual Studio.
Configure the connection string in appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=MessageDB;Trusted_Connection=True;"
}
}
If you need to apply database migrations, open the Package Manager Console in Visual Studio (Tools > NuGet Package Manager > Package Manager Console) and run:
update-database
In Visual Studio, go to Build-> Build the solution
Press F5 or click on the Run button to start the application.
Once the API is running, test it using PostMan or Swagger in the browser. Swagger will provide the documentation of the endpoints.