Skip to content

sanka-fidenz/CustomerDataAPI

Repository files navigation

.NET Core Assignment | Level 01 (Customer Data API)

Run application locally

Prerequisites:

Steps:

  • Clone the project git clone [email protected]:sanka-fidenz/CustomerDataAPI.git

  • Create a database

  • Open using Visual Studio Code(it will automatically install packages)

  • Change the ConnectionStrings.DefaultConnection value in appsettings.json with you DB ConnectionStrings

  • Create initial table of database(run migrations) dotnet ef database update

  • Build application dotnet run

Note:

To test end points a JWT token is required. To generate a token, make POST request to https://localhost:<port>/authenticate with following payload (change the port number with the port number your application runs).

{
  "username": "username",
  "password": "password"
}

End points:

  • GET Search customer http://localhost:5134/users?key=<searchKey>

  • GET Get distance http://localhost:5134/users/<customerId>/get-distance?latitude=<latitude>&longitude=<longitude>

  • GET Get customer list grouped by the zip code http://localhost:5134/users-group-by-zip-code

  • PUT Edit customer http://localhost:5134/users/<customerId>

# payload
{
    "name": "sanka"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages