Skip to content

This repository hosts a .NET 8 API for the stock exchange domain, featuring OOP principles, Entity Framework integration, Dependency Injection, and Clean Architecture. The API type is REST, gRPC ,GraphQl , and it utilizes packages like AutoMapper and Fluent Validation.

Notifications You must be signed in to change notification settings

MrFarbodMirzaee/ExchangeApi

Repository files navigation

ExchangeApi

It's an api with .net 8 about Exchange

REST Swagger Image

Here's an example of the REST Swagger image for the API: This image provides a visual representation of the API's endpoints, request/response models, and other relevant information. Swagger UI_Page_1 Swagger UI_Page_2 Swagger UI_Page_3

gRPC client Image

Here's an example of the gRPC client image on Console app : Screenshot 2024-07-09 214203

GraphQl Image:

Here's an example of the GraphQl: 347079224-2716057b-fb00-4688-b614-87ca3263d5ea

Table of Contents

Installation

To install and run the API locally, follow these steps:

  1. Clone the Repository:
  2. Install Dependencies:
  3. Set Up Environment Variables:
  4. Start the API:
  5. Verify the Installation: Open a web browser or use an API testing tool like Postman to send requests to the API endpoints and verify that it's running correctly.

Usage

  1. Authentication: If the API requires authentication, provide details on how users can authenticate themselves, such as using API keys, tokens, or other authentication methods.

  2. Endpoints and Requests: Provide a list of available endpoints and the corresponding HTTP methods (e.g., GET, POST, PUT, DELETE). Include examples of request payloads and parameters if applicable.

    Example:

    • GET /api/users: Retrieve a list of users.
    • POST /api/users: Create a new user. Request payload example:
      {
        "username": "example",
        "email": "example@example.com"
      }
  3. Responses: Describe the format of the responses returned by the API, including status codes, response bodies, and any relevant error messages.

    Example:

    • Successful response (200 OK):
      {
        "id": 1,
        "username": "example",
        "email": "example@example.com"
      }
    • Error response (4xx or 5xx):
      {
        "error": "Invalid input data"
      }

Database Connection

If you want to connect to the database, you can use the following connection string as an example:

{
  "ConnectionStrings": {
    "ExchangeApi": "Server=your-server-address;Database=your-database-name;User Id=your-username;Password=your-password;"
  }
}
{
  "ConnectionStrings": {
    "ExchangeApiIdentity": "Server=your-server-address;Database=your-database-name;User Id=your-username;Password=your-password;"
  }
}
{
  "ConnectionStrings": {
    "ExchangeApiGrpc": "Server=your-server-address;Database=your-database-name;User Id=your-username;Password=your-password;"
  }
}
{
  "ConnectionStrings": {
    "ExchangeApiGraphQl": "Server=your-server-address;Database=your-database-name;User Id=your-username;Password=your-password;"
  }
}

About

This repository hosts a .NET 8 API for the stock exchange domain, featuring OOP principles, Entity Framework integration, Dependency Injection, and Clean Architecture. The API type is REST, gRPC ,GraphQl , and it utilizes packages like AutoMapper and Fluent Validation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published