Code Monkey home page Code Monkey logo

practical-aspnetcore's Introduction

Samples for ASP.NET Core 8.0

Note

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) if you want to browse the existing stable samples that contains also .NET 7/8 samples.

Greetings from Cairo, Egypt. You can sponsor this project here.

Previous versions

6.0, 5.0, 3.1 LTS, 2.1 LTS

Sections

Section
Authentication 5
Blazor Client Side (Web Assembly) 22 .NET8 (WIP), Components, Data Binding
Blazor Server 16 Localization
Blazor Server Side Render 22
Caching 5
Configurations 10
CoreWCF 1
Dependency Injection 4
Diagnostics 5
Endpoint Routing 32
Email 2
Elsa Workflow 14 .NET8
Exception Handler Middleware 2
Features 11
Generic Hosting 9
gRPC (including grpc-Web) 12
Health Check 6
IHttpClientFactory 4
IHostedService 2
Logging 4
Localization and Globalization 6
Middleware 14
Mini Apps 2
Minimal API 36 Routing, Parameter Bindings, etc
Minimal Hosting 23
MVC 47 Localization, Routing, Razor Class Library, Tag Helpers, View Component, etc
Output Cache Middleware
Open Telemetry 3
Orchard Core 4
Path String (HttpContext.Request.Path) 1
Problem Details Middleware 3
Razor Pages 10 TempData
Request 15 Form, Cookies, Query String, Headers
Request Timeouts Middleware 6
Response 3
SignalR 1
Security 7
Single File Application 2
Static Files and File Provider 10
System.Text.Json 22
Syndications 3
Testing 1
URL Redirect/Rewrite 6
Uri Helper 5
Windows Service 1
Web Sockets 6
Web Utilities 3
Orleans 5 .NET.8
Xml 1
YARP 1

For Data Access samples, go to the excellent ORM Cookbook. .NET team also has a sample repository.

How to run these samples

To run these samples, simply open your command line console, go to each folder and execute dotnet watch run.

Misc (6)

  • Application Environment

    This sample shows how to obtain application environment information (target framework, etc).

  • Show Connection info

    Enumerate the connection information of a HTTP request.

  • Password Hasher server

    Give it a string and it will generate a secure hash for you, e.g. localhost:5000?password=mypassword.

  • Version info

    Show various version info of the framework your system is running on.

  • IApplicationLifetime

    Responds to application startup and shutdown.

    We are using IApplicationLifetime that trigger events during application startup and shutdown.

  • Short Circuit

    Use MapShortCircuit or .ShortCircuit() to efficiently respond to a request without going through a middleware pipeline run.

Server-Sent Events (1)

  • Forever Server

    This server will send a 'hello world' greeting forever.

Markdown (2)

Utils (3)

  • Status Codes

    Here we contrast between the usage of Microsoft.AspNetCore.Http.StatusCodes and System.Net.HttpStatusCode.

  • MediaTypeNames

    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.

  • MediaTypeNames - 2

    Using FileExtensionContentTypeProvider to obtain the correct MIME type of a filename extension.

Device Detection (1)

The samples in this section rely on Wangkanai.Detection library.

  • Device Detection

    This is the most basic device detection. You will be able to detect whether the client is a desktop or a mobile client.

Image Sharp (1)

All these samples require SixLabors.ImageSharp.Web middleware package. This middleware is an excelent tool to process your day to day image processing need.

  • Image-Sharp

    This example shows how to enable image resizing functionality to your site. It's super easy and the middleware takes care of caching, etc.

Misc

practical-aspnetcore's People

Contributors

adrientorris avatar anurag1302 avatar berezhnyk avatar dependabot[bot] avatar djsleurink avatar dodyg avatar doggy8088 avatar ericsink avatar icnocop avatar jimbobsquarepants avatar khusroohayat avatar kinani avatar kralizek avatar lfmundim avatar lohithgn avatar maherjendoubi avatar mii9000 avatar mohamedgallabsk avatar mrvitaly avatar neman avatar reubenbond avatar rtpharry avatar sherifr212 avatar slang25 avatar speccan avatar voiture-0 avatar wangkanai avatar yasar11732 avatar youssef1313 avatar zjkung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

practical-aspnetcore's Issues

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.