{"id":18417164,"url":"https://github.com/felipementel/potatostore","last_synced_at":"2025-04-07T12:32:17.669Z","repository":{"id":39717425,"uuid":"471190354","full_name":"felipementel/PotatoStore","owner":"felipementel","description":"This project was created by Avanade Team to study","archived":false,"fork":false,"pushed_at":"2022-10-13T18:24:42.000Z","size":637,"stargazers_count":14,"open_issues_count":5,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-22T18:41:23.899Z","etag":null,"topics":["docker","docker-compose","dotnet","redis","uml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipementel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-18T00:53:23.000Z","updated_at":"2025-03-11T11:09:18.000Z","dependencies_parsed_at":"2023-01-19T19:33:37.236Z","dependency_job_id":null,"html_url":"https://github.com/felipementel/PotatoStore","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipementel%2FPotatoStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipementel%2FPotatoStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipementel%2FPotatoStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipementel%2FPotatoStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipementel","download_url":"https://codeload.github.com/felipementel/PotatoStore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653194,"owners_count":20973778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","dotnet","redis","uml"],"created_at":"2024-11-06T04:08:28.940Z","updated_at":"2025-04-07T12:32:12.658Z","avatar_url":"https://github.com/felipementel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# PotatoStore\n\n[![.NET](https://github.com/felipementel/PotatoStore/actions/workflows/dotnet-estudo.yml/badge.svg?branch=main)](https://github.com/felipementel/PotatoStore/actions/workflows/dotnet-estudo.yml)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=felipementel_PotatoStore\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=felipementel_PotatoStore)\n\nThis project was created by Avanade Team to study\n\nCommands to create a project\n\u003e dotnet new globaljson --sdk-version 6.0.400\n\u003e \n\u003e dotnet new webapi --name Potato.Product\n\n## WSL2\n\n````\nhttps://docs.microsoft.com/en-us/windows/wsl/install\n````\n\nIP Tables to WSL-2\n```\nupdate-alternatives --config iptables\n```\n\nTo use in WSL for ELK warmup\n\n```\nsysctl -w vm.max_map_count=262144\n```\n\nPackages\n\n```\ndotnet tool install --global dotnet-reportgenerator-globaltool\n```\n```\ndotnet tool install --global dotnet-ef\n```\n```\ndotnet tool install --global dotnet-sonarscanner\n```\n```\ndotnet tool install --global dotnet-coverage\n```\n\nReferences\n\n1. To create a project:\n\nhttps://docs.microsoft.com/en-us/dotnet/core/tools/\n\n1. To create Application tier\n\nhttps://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/user-defined-conversion-operators\n\n1. To create infra.database tier\n \nhttps://docs.microsoft.com/en-us/ef/core/modeling/\n\nhttps://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli\n\nhttps://www.npgsql.org/efcore\n\n## Comandos\n\n### Para efetivar a alteração no banco de dados pelo Migrations\n\n\u003e Para executar os comandos, esteja na pasta \u003cb\u003esrc\u003c/b\u003e\n\n```\ndotnet ef migrations add InitDatabase --project Potato.Product.Infra.Database -s Potato.Product.Api -c Potato.Product.Infra.Database.ProductContext --verbose\n```\n\n```\ndotnet ef database update InitDatabase --project Potato.Product.Infra.Database -s Potato.Product.Api -c Potato.Product.Infra.Database.ProductContext --verbose\n```\n\n```json\n{\n  \"name\": \"Kleber Edson\",\n  \"description\": \"dupla de dois\",\n  \"url\": \"http://avanade-estudo.com.br\",\n  \"sku\": \"$#RTGVDF\",\n  \"price\": 99.33\n}\n```\n### Generate Test Report\n````\nhttps://reportgenerator.io/\n````\n\nRun tests\n\n## Using CMD\n\n````\n$\u003esrc\u003e dotnet test Potato.Product.sln /p:CollectCoverage=true /p:CoverletOutput=Results\\Coverage /p:CoverletOutputFormat=cobertura\n````\n````\n$\u003esrc\u003e reportgenerator -reports:**/coverage.cobertura.xml -targetdir:Tests\\results\\WebResult\n````\n````\n#Abre o arquivo no browser padrão\n$\u003esrc\u003e Tests\\results\\WebResult\\index.html\n````\n\n# SonarQube Local\n````\ndotnet sonarscanner begin /k:\"PotatoStore\" /d:sonar.host.url=\"http://localhost:9044\" /d:sonar.login=\"YOUR_KEY\" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \n\ndotnet build --no-incremental\n\ndotnet-coverage collect 'dotnet test' -f xml  -o 'coverage.xml'\n\ndotnet sonarscanner end /d:sonar.login=\"YOUR_KEY\"\n````\n\nrefs: https://docs.sonarqube.org/latest/analysis/test-coverage/dotnet-test-coverage/\n\n# SonarCloud\n\n\n# Build to Docker Hub\n\nrefs: https://docs.docker.com/ci-cd/github-actions/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipementel%2Fpotatostore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipementel%2Fpotatostore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipementel%2Fpotatostore/lists"}