Skip to content

huynhducthanhtuan/PokemonApi

Repository files navigation

PokemonApi

Review and rate your favorite pokemons

Installation Guide

1. Clone project

git clone https://github.com/huynhducthanhtuan/PokemonApi.git

2. Import SQL Server database from pokemon_db.bak file

3. Update SQL Server database connection string

appsettings.json

"ConnectionStrings": {
  "DefaultConnection": "Data Source=THANHTUAN;Initial Catalog=pokemon_db;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False"
}
Change THANHTUAN with your computer name

4. Build project

dotnet build

5. Run project

dotnet watch run
Exception when step 2 fails

1. Install dotnet-ef if not already

dotnet tool install --global dotnet-ef

2. Create a migration

dotnet-ef migrations add Init

3. Update database definition from migration

dotnet-ef database update

4. Seeding data

dotnet run seeddata

Demonstration

Account APIs

image

Category APIs

image

Country APIs

image

Owner APIs

image

Pokemon APIs

image

Review APIs

image

Reviewer APIs

image

Reference Resources

ASP.NET Web API Tutorial 2022

pokemon-review-api Repository

Releases

No releases published

Packages

No packages published