{"id":13399308,"url":"https://github.com/dodyg/practical-aspnetcore","last_synced_at":"2025-05-14T05:10:35.742Z","repository":{"id":37271627,"uuid":"64290739","full_name":"dodyg/practical-aspnetcore","owner":"dodyg","description":"Practical samples of ASP.NET Core 10 Preview 3, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.","archived":false,"fork":false,"pushed_at":"2025-04-21T10:16:04.000Z","size":45051,"stargazers_count":9923,"open_issues_count":173,"forks_count":1354,"subscribers_count":413,"default_branch":"net8.0","last_synced_at":"2025-04-21T11:30:22.199Z","etag":null,"topics":["asp-net-core","aspnet-core","aspnetcore","dotnet-core","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dodyg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["dodyg"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2016-07-27T08:23:40.000Z","updated_at":"2025-04-21T10:16:09.000Z","dependencies_parsed_at":"2025-04-21T11:40:04.530Z","dependency_job_id":null,"html_url":"https://github.com/dodyg/practical-aspnetcore","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/dodyg%2Fpractical-aspnetcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodyg%2Fpractical-aspnetcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodyg%2Fpractical-aspnetcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodyg%2Fpractical-aspnetcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodyg","download_url":"https://codeload.github.com/dodyg/practical-aspnetcore/tar.gz/refs/heads/net8.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076849,"owners_count":22010611,"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":["asp-net-core","aspnet-core","aspnetcore","dotnet-core","hacktoberfest"],"created_at":"2024-07-30T19:00:36.172Z","updated_at":"2025-05-14T05:10:35.722Z","avatar_url":"https://github.com/dodyg.png","language":"C#","funding_links":["https://github.com/sponsors/dodyg"],"categories":["Sample Projects","C#","C\\#","hacktoberfest","DOTNET","C# #","例子","Uncategorized","Sample \u0026 Reference Applications","git repos"],"sub_categories":["Workflow","工作流","Uncategorized","Benchmarks"],"readme":"# Samples for ASP.NET Core 8.0 \n\n\u003e [!NOTE]\n\u003e This repository is WIP. I am updating all the previous samples from .NET 6/7 to .NET 8. Check the previous stable branch ([6.0](https://github.com/dodyg/practical-aspnetcore/tree/net6.0/)) if you want to browse the existing stable samples that contains also .NET 7/8 samples.\n\nGreetings from Cairo, Egypt. You can [sponsor](https://github.com/sponsors/dodyg) this project [here](https://github.com/sponsors/dodyg). \n\n## ASP.NET Core 10\n\nYou can find samples on new features availabel in ASP.NET Core 10 Preview 4(8) [here](/projects/net10).\n\n## ASP.NET Core 9\n\nYou can find samples on new features availabel in ASP.NET Core 9(3) [here](/projects/net9).\n\n## Previous versions\n\n[6.0](https://github.com/dodyg/practical-aspnetcore/tree/net6.0/), [5.0](https://github.com/dodyg/practical-aspnetcore/tree/net5.0/), [3.1 LTS](https://github.com/dodyg/practical-aspnetcore/tree/3.1-LTS/), [2.1 LTS](https://github.com/dodyg/practical-aspnetcore/tree/2.1-LTS)\n\n## Other Samples\n\n- For ATProtocol (the underlying open protocol for Bluesky) related samples, you can find them [here](https://github.com/dodyg/bluenile). \n- For Hydro Framework (Razor Pages compatible), you can find them [here](/projects/hydro/)(8).\n- [Official .NET Aspire samples](https://github.com/dotnet/aspire-samples).\n- For Data Access samples, go to the excellent [ORM Cookbook](https://github.com/Grauenwolf/DotNet-ORM-Cookbook).\n- .NET team also has [a sample repository](https://github.com/dotnet/samples).\n\n\n## Sections\n\n| Section                                                                 |     |                                                                              |\n| ----------------------------------------------------------------------- | --- | ---------------------------------------------------------------------------- |\n| [Authentication](/projects/authentication)                              | 5   |                                                                              |\n| [Blazor Client Side (Web Assembly)](/projects/blazor-wasm)              | 22  | .NET8 (WIP), Components, Data Binding                                        |\n| [Blazor Server](/projects/blazor-ss)                                    | 16  | Localization                                                                 |\n| [Blazor Server Side Render](/projects/blazor-ssr)                       | 22  |                                                                              |\n| [Caching](/projects/caching)                                            | 5   |                                                                              |\n| [Configurations](/projects/configurations)                              | 10  |                                                                              |\n| [CoreWCF](/projects/corewcf)                                            | 1   |                                                                              |\n| [Dependency Injection](/projects/dependency-injection/)                 | 4   |                                                                              |\n| [Diagnostics](/projects/diagnostics)                                    | 5   |                                                                              |\n| [Endpoint Routing](/projects/endpoint-routing)                          | 32  |                                                                              |\n| [Email](/projects/mailkit)                                              | 2   |                                                                              |\n| [Elsa Workflow](/projects/elsa)                                         | 14  | .NET8                                                                        |\n| [Exception Handler Middleware](/projects/exception-handler-middleware/) | 2   |                                                                              |\n| [Features](/projects/features)                                          | 11  |                                                                              |\n| [Generic Hosting](/projects/generic-host)                               | 9   |                                                                              |\n| [gRPC](/projects/grpc) (including grpc-Web)                             | 12  |                                                                              |\n| [Health Check](/projects/health-check)                                  | 6   |                                                                              |\n| [HTMX](/projects/htmx)                                                  | 40  |                                                                              |\n| [IHttpClientFactory](/projects/httpclientfactory)                       | 4   |                                                                              |\n| [IHostedService](/projects/ihosted-service)                             | 2   |                                                                              |\n| [Logging](/projects/logging)                                            | 6   |                                                                              |\n| [Localization and Globalization](/projects/localization)                | 6   |                                                                              |\n| [Middleware](/projects/middleware)                                      | 14  |                                                                              |\n| [Mini Apps](/projects/mini)                                             | 2   |                                                                              |\n| [Minimal API](/projects/minimal-api)                                    | 36  | Routing, Parameter Bindings, etc                                             |\n| [Minimal Hosting](/projects/minimal-hosting)                            | 23  |                                                                              |\n| [MVC](/projects/mvc)                                                    | 47  | Localization, Routing, Razor Class Library, Tag Helpers, View Component, etc |\n| [Output Cache Middleware](/projects/output-cache-middleware)            |     |                                                                              |\n| [Open Telemetry](/projects/open-telemetry/)                             | 3   |                                                                              |\n| [Orchard Core](/projects/orchard-core)                                  | 4   |                                                                              |\n| [Path String (HttpContext.Request.Path)](/projects/path-string)         | 1   |                                                                              |\n| [Polly](/projects/polly/)                                               | 1   |                                                                              |\n| [Problem Details Middleware](/projects/problem-details-middleware/)     | 3   |                                                                              |\n| [Razor Pages](/projects/razor-pages)                                    | 10  | TempData                                                                     |\n| [RazorSlices](/projects/razor-slices)                                   | 1   |                                                                              |\n| [Request](/projects/request)                                            | 15  | Form, Cookies, Query String, Headers                                         |\n| [Request Timeouts Middleware](/projets/request-timeouts-middleware)     | 6   |                                                                              |\n| [Response](/projects/response)                                          | 3   |                                                                              |\n| [SignalR](/projects/signalr)                                            | 1   |                                                                              |\n| [Security](/projects/security)                                          | 7   |                                                                              |\n| [Single File Application](/projects/sfa)                                | 2   |                                                                              |\n| [Static Files and File Provider](/projects/file-provider)               | 10  |                                                                              |\n| [System.Text.Json](/projects/json)                                      | 23  |                                                                              |\n| [Syndications](/projects/syndications)                                  | 3   |                                                                              |\n| [Testing](/projects/testing)                                            | 1   |                                                                              |\n| [Unpoly](/projects/unpoly)                                              | 5   |                                                                              |\n| [URL Redirect/Rewrite](/projects/rewrite)                               | 6   |                                                                              |\n| [Uri Helper](/projects/uri-helper)                                      | 5   |                                                                              |\n| [Windows Service](/projects/windows-service)                            | 1   |                                                                              |\n| [Web Sockets](/projects/web-sockets)                                    | 6   |                                                                              |\n| [Web Utilities](/projects/web-utilities)                                | 3   |                                                                              |\n| [Orleans](/projects/orleans)                                            | 5   | .NET.8                                                                       |\n| [Xml](/projects/xml)                                                    | 1   |                                                                              |\n| [YARP](/projects/yarp)                                                  | 1   |                                                                              |\n\n## How to run these samples\n\nTo run these samples, simply open your command line console, go to each folder and execute `dotnet watch run`.\n\n### Misc (6)\n\n-   [Application Environment](/projects/application-environment)\n\n    This sample shows how to obtain application environment information (target framework, etc).\n\n-   [Show Connection info](/projects/connection-info)\n\n    Enumerate the connection information of a HTTP request.\n\n-   [Password Hasher server](/projects/password-hasher)\n\n    Give it a string and it will generate a secure hash for you, e.g. `localhost:5000?password=mypassword`.\n\n-   [Version info](/projects/version)\n\n    Show various version info of the framework your system is running on.\n\n-   [IApplicationLifetime](/projects/i-application-lifetime)\n\n    Responds to application startup and shutdown.\n\n    We are using `IApplicationLifetime` that trigger events during application startup and shutdown.\n\n- [Short Circuit](map-short-circuit)\n\n  Use `MapShortCircuit` or `.ShortCircuit()` to efficiently respond to a request without going through a middleware pipeline run. \n\n### Server-Sent Events (1)\n\n-   [Forever Server](/projects/sse)\n\n    This server will send a 'hello world' greeting forever.\n\n### Markdown (2)\n\n-   [Markdown server](/projects/markdown-server)\n\n    Serve markdown file as html file. You will see how you can create useful app using a few basic facilities in aspnetcore.\n\n    We take `\"Markdig\"` as dependency.\n\n-   [Markdown server - implemented as middleware component](/projects/markdown-server-middleware)\n\n    Serve markdown file as html file. It has the same exact functionality as [Markdown server](/projects/markdown-server) but implemented using middleware component.\n\n    We take `\"Markdig\"` as dependency.\n\n### Utils (3)\n\n-   [Status Codes](/projects/utils/http-status-codes)\n\n    Here we contrast between the usage of `Microsoft.AspNetCore.Http.StatusCodes` and `System.Net.HttpStatusCode`.\n\n-   [MediaTypeNames](/projects/utils/media-type-names)\n\n    This class provides convenient constants for some common MIME types. It's not extensive by any means however `MediaTypeNames.Text.Html` and `MediaTypeNames.Application.Json` come handy.\n\n-   [MediaTypeNames - 2](/projects/utils/media-type-names-2)\n\n    Using `FileExtensionContentTypeProvider` to obtain the correct MIME type of a filename extension.\n\n### Device Detection (1)\n\nThe samples in this section rely on [Wangkanai.Detection](https://github.com/wangkanai/wangkanai/tree/main/Detection) library.\n\n-   [Device Detection](/projects/device-detection)\n\n    This is the most basic device detection. You will be able to detect whether the client is a desktop or a mobile client.\n\n### Image Sharp (1)\n\nAll these samples require `SixLabors.ImageSharp.Web` middleware package. This middleware is an excelent tool to process your day to day image processing need.\n\n-   [Image-Sharp](/projects/image-sharp)\n\n    This example shows how to enable image resizing functionality to your site. It's super easy and the middleware takes care of caching, etc.\n\n## Misc\n\n-   [Contributor Guidelines](https://github.com/dodyg/practical-aspnetcore/blob/master/CONTRIBUTING.md)\n-   [Code of Conduct](https://github.com/dodyg/practical-aspnetcore/blob/master/CODE_OF_CONDUCT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodyg%2Fpractical-aspnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodyg%2Fpractical-aspnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodyg%2Fpractical-aspnetcore/lists"}