Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Latest commit

 

History

History
131 lines (99 loc) · 2.71 KB

File metadata and controls

131 lines (99 loc) · 2.71 KB

backend

Prerequisites

  1. .NET 5.0

  2. SQL-Server

  3. SSMS

To Start

  1. make changes in DefaultConnection of appsettings.json

      "ConnectionStrings": {
        "DefaultConnection": "server=SERVER_NAME;database=DATABASE_NAME;trusted_connection=true;"
      },
  2. For Database connection

    dotnet build
    dotnet ef migrations add InitialCreate --context DataBaseContext --output-dir Migrations
    dotnet ef database update

    For AuthenticationException use these commands

    dotnet dev-certs https --clean
    dotnet dev-certs https --trust
    dotnet run
  3. Use postman or thunderclient further

    1. POST method
    https://localhost:5001/api/authenticate
    

    There in basic auth use these credentials

    UserName: admin@localhost
    Password: Passcode1
    Token would be generated
    Screenshots
    Response

thunderclient Log

1. POST login

https://localhost:5001/api/authenticate

2. GET all_users

https://localhost:5001/api/authenticate

3. GET first_user

https://localhost:5001/api/administration/1

4. POST create_user

https://localhost:5001/api/authenticate

5. DELETE first_user

https://localhost:5001/api/authenticate/1

1. GET all_orders_by_order

https://localhost:5001/api/order/order

2. GET all_orders_by_drug

https://localhost:5001/api/order/drug

1. POST order

https://localhost:5001/api/products/1
{
  "MemberId":"2434",
  "ProductName": "ICICI",
  "RequiredDate": "1999-11-18T06:30:00",
  "Quantities": 2,
  "UserId":"1",
}

1. GET all_messages

https://localhost:5001/api/ContactUs/

1. GET first_messages

https://localhost:5001/api/ContactUs/1