Git Product home page Git Product logo

allandutra / pokemon-crud Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 6.27 MB

This repository was developed to learn how to create a CRUD in C# in version 5.0 of .NET using clean architecture following the playlist https://www.youtube.com/playlist?list=PLbq2QKd5ieAt0H551D_0E4bGIYRxbq5HL by Francis Silveira Andrade on YouTube

License: MIT License

C# 100.00%
api clean-architecture crud csharp dotnet entity-framework-core migrations sqlserver

pokemon-crud's Introduction

📚 Pokémon CRUD

This repository was developed to learn how to create a CRUD in C# in version 5.0 of .NET using clean architecture following the playlist https://www.youtube.com/playlist?list=PLbq2QKd5ieAt0H551D_0E4bGIYRxbq5HL by Francis Silveira Andrade on YouTube

📫 Routes

GET — "/api/Pokemons"

Get all Pokemons

response:

[
  {
     "id": int,
     "tipo": string,
     "nome": string,
     "poder": double,
     "dataCriacao"?: DateTime,
     "dataAtualizacao"?: DateTime
  }
]

POST — "/api/Pokemons"

Create a new Pokemon

body:

{
   "tipo": string,
   "nome": string,
   "poder": double 
}

response:

{
   "id": int,
   "tipo": string,
   "nome": string,
   "poder": double,
   "dataCriacao": DateTime,
   "dataAtualizacao": null
}

PUT — "/api/Pokemons"

Update an existing Pokemon by your id

body:

{
   "tipo": string,
   "nome": string,
   "poder": double,
   "id": int
}

response:

{
   "id": int,
   "tipo": string,
   "nome": string,
   "poder": double,
   "dataCriacao": DateTime,
   "dataAtualizacao": DateTime
}

GET — "/api/Pokemons/{ id }"

Get a specific Pokemon by your id

route params:

id: int

response:

{
   "id": int,
   "tipo": string,
   "nome": string,
   "poder": double,
   "dataCriacao": DateTime,
   "dataAtualizacao"?: DateTime
}

DELETE — "/api/Pokemons/{ id }"

Delete a Pokemon by your id

route params:

id: int

🌐 Status

Finished project ✅

🧰 Prerequisites

.NET 5.0

Connection string to SQL Server BD in app-charp/AP.Api/appsettings.json named as "APConnection"

🔧 Installation

$ git clone https://github.com/AllanDutra/pokemon-crud.git

$ cd pokemon-crud/AP.Api

$ dotnet ef database update -p ../AP.Data/AP.Data.csproj -s ./AP.Api.csproj

$ dotnet run

Server listenning at https://localhost:5001/!

🔨 Tools used

pokemon-crud's People

Contributors

allandutra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.