Skip to content

Repository files navigation

crudDapper - docs

dotnet verion : 9.0.101
Hello Friend!

This API provides endpoints for managing users in the system. It allows for creating, reading, updating, and deleting user records. Each user has a set of attributes such as NomeCompleto (Full Name), Email, Cargo (Position), Salario (Salary), CPF (Brazilian Identification Number), and Situacao (Status). The API is designed to be simple and intuitive, supporting the basic CRUD (Create, Read, Update, Delete) operations.
Base URL
The base URL for the API is: http://localhost:5162/api/usuario/

Endpoints Overview:

  • POST /create: Adds a new user to the system.
  • GET /readAll: Retrieves all users from the database.
  • PUT /update: Updates the details of an existing user.
  • DELETE /delete: Deletes a user from the system.
  • GET /findById: Fetches a user by their ID.

Each endpoint requires specific parameters in the request body (for POST, PUT, and DELETE), or query parameters (for GET), and returns relevant data or a success/failure status. This documentation provides a detailed description of each endpoint, including request examples and expected responses. You can use it to interact with your API via tools like Postman or any HTTP client.



Exemples

Create

http://localhost:5162/api/usuario/create

Creates a new user in the database. This endpoint requires the new user's details to be provided in the request body. Upon creation, a new user will be added, and a success status will be returned.

Body


  {
    "NomeCompleto" : "Ramadan 6",
    "Email" : "ramadan6@gmail.com",
    "Cargo" : "FullStack6",
    "Salario" : 9996.0,
    "CPF" : "1233ds326",
    "Situacao" : true,
    "Senha" : "1234566"
  }



ReadAll

http://localhost:5162/api/usuario/readAll

Fetches all the users registered in the database. This endpoint returns a list of all users, including information like name, email, position, salary, etc.




Update

http://localhost:5162/api/usuario/update

Updates the details of an existing user based on the provided ID. This endpoint allows you to modify information such as name, email, position, salary, etc. The new user details should be sent in the request body along with the user's ID.

Body


  {
    "id": 6,
    "nomeCompleto": "Ramadan 16",
    "email": "ramadan16@gmail.com",
    "cargo": "FullStack6",
    "salario": 9996,
    "situacao": false
  }



Delete

http://localhost:5162/api/usuario/delete

Deletes an existing user from the database based on the provided ID. This endpoint requires the user's ID to be sent in the request body.

Body


  {
    "id" : 4
  }



FindById

http://localhost:5162/api/usuario/findById

Fetches a specific user by the provided ID. This endpoint returns the full details of the user corresponding to the given ID.


  {
    "id" : 3
  }

About

Hello friend!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages