{"id":19029200,"url":"https://github.com/sulmar/vavatech-netcore6-202210","last_synced_at":"2025-06-11T01:31:54.369Z","repository":{"id":61655484,"uuid":"553714371","full_name":"sulmar/vavatech-netcore6-202210","owner":"sulmar","description":"Przykłady ze szkolenia Tworzenie usług sieciowych w .NET 6","archived":false,"fork":false,"pushed_at":"2022-10-25T11:46:06.000Z","size":3091,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T05:08:01.371Z","etag":null,"topics":["netcore6"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sulmar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-18T16:43:33.000Z","updated_at":"2022-10-28T19:24:15.000Z","dependencies_parsed_at":"2023-01-20T12:05:31.622Z","dependency_job_id":null,"html_url":"https://github.com/sulmar/vavatech-netcore6-202210","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulmar%2Fvavatech-netcore6-202210","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulmar%2Fvavatech-netcore6-202210/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulmar%2Fvavatech-netcore6-202210/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulmar%2Fvavatech-netcore6-202210/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sulmar","download_url":"https://codeload.github.com/sulmar/vavatech-netcore6-202210/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulmar%2Fvavatech-netcore6-202210/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259180872,"owners_count":22817824,"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":["netcore6"],"created_at":"2024-11-08T21:13:34.858Z","updated_at":"2025-06-11T01:31:54.312Z","avatar_url":"https://github.com/sulmar.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tworzenie usług sieciowych w .NET 6\nPrzykłady ze szkolenia.\n\n![Mind map of.NET 6](/drafts/aspnet-core6.png)\n\n\n## Podstawy\n\n### Komendy CLI\n#### Środowisko\n- ``` dotnet --version ``` - wyświetlenie wersji SDK\n- ``` dotnet --list-sdks ``` - wyświetlenie listy zainstalowanych SDK\n- ``` dotnet new globaljson ``` - utworzenie pliku _global.json_\n- ``` dotnet new globaljson --sdk-version {version} ``` - utworzenie pliku _global.json_ i ustawienie wersji SDK\n\n#### Projekt\n- ``` dotnet new --list ``` - wyświetlenie listy dostępnych szablonów\n- ``` dotnet new {template} ``` - utworzenie nowego projektu na podstawie wybranego szablonu\n- ``` dotnet new {template} -o {output} ``` - utworzenie nowego projektu w podanym katalogu\n- ``` dotnet build ``` - kompilacja projektu\n- ``` dotnet run ``` - uruchomienie projektu\n- ``` dotnet watch run ``` - uruchomienie projektu w trybie śledzenia zmian\n- ``` dotnet run {app.dll}``` - uruchomienie aplikacji\n- ``` dotnet test ``` - uruchomienie testów jednostkowych\n- ``` dotnet watch test ``` - uruchomienie testów jednostkowych w trybie śledzenia zmian\n- ``` dotnet add {project.csproj} reference {library.csproj} ``` - dodanie odwołania do biblioteki\n- ``` dotnet remove {project.csproj} reference {library.csproj} ``` - usunięcie odwołania do biblioteki\n- ``` dotnet clean ``` - wyczyszczenie wyniku kompilacji, czyli zawartości folderu pośredniego _obj_ oraz folderu końcowego _bin_\n\n#### Rozwiązanie\n- ``` dotnet new sln ``` - utworzenie nowego rozwiązania\n- ``` dotnet new sln --name {name} ``` - utworzenie nowego rozwiązania o określonej nazwie\n- ``` dotnet sln add {folder}``` - dodanie projektu z folderu do rozwiązania\n- ``` dotnet sln remove {folder}``` - usunięcie projektu z folderu z rozwiązania\n- ``` dotnet sln add {project.csproj}``` - dodanie projektu do rozwiązania\n- ``` dotnet sln remove {project.csproj}``` - usunięcie projektu z rozwiązania\n\n### Konfiguracja\n\n#### Dostawcy\n- AddJsonFile\n- AddCommandLine\n- AddEnvironmentVariables\n- AddXmlFile\n- [AddIniFile](https://minimal-apis.github.io/hello-minimal/#webapplicationbuilder)\n- AddSecretKey\n- AddInMemoryCollection\n- AddKeyPerFile\n- [AddYamlFile](https://github.com/andrewlock/NetEscapades.Configuration#yaml-configuration-provider)\t\n#### Pobieranie konfiguracji\n- Configuration\n- IOptions\n\n### Środowiska\n- Development\n- Staging\n- Production\n- Własne\n\n### [Rejestrowanie logów](https://minimal-apis.github.io/hello-minimal/#logging)\n\n#### Serilog\n- Konsola\n- Plik xml\n- Plik json\n- Seq \n\n#### OpenTelemetry\n- [OpenTelemetry](https://opentelemetry.io)\n- [Jeager](https://www.jaegertracing.io)\n\n\n### MinimalApi\n\n#### Mapowanie tras\n\n- [Przekazywanie parametrów](https://minimal-apis.github.io/hello-minimal/#parameter-binding)\n\n\t- FromRoute\n\t\t- BindAsync\n\n\t- FromQuery\n\t\t- TryParse\n\n\t- FromHeader\n\t- FromBody\n\n- Reguły\n\t- Wbudowane\n\t- Własne\n\n### Akcje\n\n- MapGet\n- MapPost\n- MapDelete\n- Results.Forward\n- MapMethods\n\t- HEAD\n\t- PATCH\n\n### [Odpowiedzi](https://minimal-apis.github.io/hello-minimal/#responses)\n\n- Results.Ok\n- Results.NotFound\n- Results.CreatedAtRoute\n- Results.Text\n\n\t- [HTML](https://github.com/sulmar/altkom-netcore6-202210/blob/db5881d84d6cec9d6a6e63fda0c4fbe9b70c9822/src/Altkom.Net6.MinimalApi/Startup/MapEndpoints.cs#L210)\n\n- [Results.Json](https://minimal-apis.github.io/hello-minimal/#json)\n\n- [Results.File](https://minimal-apis.github.io/hello-minimal/#file)\n\n- [Results.Stream](https://minimal-apis.github.io/hello-minimal/#stream)\n\n- [Results.Redirect](https://minimal-apis.github.io/hello-minimal/#redirect)\n\n### Obsługa plików\n\n- [Pliki statyczne](https://minimal-apis.github.io/hello-minimal/#changing-the-web-root)\n\n- Generowanie plików\n- Wysyłanie plików\n\n### [OpenAPI](https://minimal-apis.github.io/hello-minimal/#openapi-swagger)\n\n### Walidacja modelu\n\n- [FluentValidation](https://github.com/sulmar/altkom-netcore6-202210/blob/master/src/Altkom.Net6.MinimalApi/Startup/MapEndpoints.cs#L58)\n\n- Results.ValidationProblem\n\n### HttpClient\n\n- [Rerejestrowanie HttpClient](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Startup/DependencyInjectionSetup.cs#L75)\n\n\t- Nazwani\n\t- [Własna klasa](https://github.com/sulmar/dotnet6-minimal-api/blob/8def5e6cb6c03f8af2bb93c21aa62ca0a1426bd1/MinimalApiDemo/Services/NbpApiClient.cs#L5)\n\n\t- [Refit](https://github.com/sulmar/dotnet6-minimal-api/blob/8def5e6cb6c03f8af2bb93c21aa62ca0a1426bd1/MinimalApiDemo/Services/NbpApiClient.cs#L20)\n\n- [Wstrzykiwanie](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Startup/MapEndpoints.cs#L401)\n\n### Wstrzykiwanie zależności\n\n- Rejestracja usług\n- Wstrzykiwanie do metody\n\n### [HealthCheck](https://github.com/sulmar/vavatech-dotnet-6-microservices-202210/blob/master/src/Shopper/CatalogService.Api/Program.cs#L123)\n\n### Cache\n\n- [MemoryCache](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Startup/MapEndpoints.cs#L301)\n\n- [Distributed Cache](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Startup/MapEndpoints.cs#L68)\n\n\t- [Redis](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Program.cs#L78)\n\n### [Autoryzacja](https://minimal-apis.github.io/hello-minimal/#authorization)\n\n### Serializacja\n\n- [Enum](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Program.cs#L96)\n\n- [NewtonsoftJson](https://github.com/sulmar/vavatech-dotnet-6-microservices-202210/blob/master/src/Shopper/CatalogService.Api/Program.cs#L94)\n\n### [Wersjonowanie](https://github.com/dotnet/aspnet-api-versioning/wiki)\n\n## MVC\n\n### Kontrolery\n\n- Mapowanie tras\n\n\t- Przekazywanie parametrów\n\n\t\t- FromRoute\n\t\t- FromQuery\n\n\t\t\t- ComplexType\n\n\t\t- FromHeader\n\t\t- FromBody\n\n\t- Reguły\n\n\t\t- Wbudowane\n\t\t- Własne\n\n### Akcje\n\n- HttpGet\n- HttpPost\n- HttpPut\n- HttpPatch\n\n### Results\n\n- POCO\n\n\t- OkResult\n\t- OkObjectResult\n\t- NotFoundResult\n\n- ControllerBase\n\n\t- Ok\n\t- NotFound\n\t- CreatedAtRoute\n\n### OpenAPI\n\n### Obsługa plików\n\n- Pobieranie plików\n- Generowanie plików\n- Wysyłanie plików\n\n### Walidacja modelu\n\n- DataAnnotations\n- FluentValidation\n\n\t- ValidationProblemResult\n\n### Wstrzykiwanie zależności\n\n- Rejestracja usłg\n- Poprzez konstruktor\n- Do metody [FromServices]\n\n### Filtry\n\n- Filtry akcji\n\n### HealthCheck\n\n### Ardalis Endpoints\n\n## Middleware\n\n### Zasada działania Middleware\n\n### Przechwytywanie żądań\n\n- Run\n- Use\n\n### [Utworzenie własnej warstwy](https://github.com/sulmar/dotnet6-minimal-api/blob/master/MinimalApiDemo/Middlewares/ApiKeyMiddleware.cs)\n\n## Bezpieczeństwo\n\n### Uwierzytelnianie\n\n- Basic\n- JWT Tokens\n\n### Autoryzacja\n\n### Role\n\n### Poświadczenia (Claims)\n\n### Zasady (Policies)\n\n\n\n## Dodatki do Visual Studio \n- [Rainbow Braces](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.RainbowBraces)\n- [REST Client](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.RestClient)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulmar%2Fvavatech-netcore6-202210","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulmar%2Fvavatech-netcore6-202210","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulmar%2Fvavatech-netcore6-202210/lists"}