Immerse yourself in the world of .NET and join our live stream for 3 days of free online content June 7 - 9 featuring speakers from the .NET Community and Microsoft product teams.
Learn to develop for web, mobile, desktop, games, services, libraries and more for a variety of platforms and devices all with .NET! We'll have presentations on .NET Core and ASP.NET Core, C#, F#, Roslyn, Visual Studio, Universal Windows Platform (UWP), Xamarin, and much more.
سری بررسی NET Aspire.
.NET Aspire Developers Day
15 videos
Are you ready to take your .NET development skills to the next level? We are thrilled to announce .NET Aspire Developers Day, a unique livestream event happening on July 23, 2024. Whether you're an experienced .NET developer or just getting started with .NET Aspire, this event is designed to equip you with advanced knowledge, practical skills, and insights from industry experts.
Professional REST API design with ASP.NET Core and WebAPI
This project is an example of lightweight and extensible infrastructure for building RESTful Web API with ASP.NET Core.
This example contains a number of tricks and techniques which I've learned while building APIs in ASP.NET Core.
Techniques and Features
- JWT Authentication
- Secure JWT using Encryption (JWE)
- Logging to File, Console and Database using Elmah & NLog
- Logging to sentry.io (Log Management System)
- Exception Handling using Custom Middleware
- Automatic Validation
- Standard API Resulting
- Dependency Injection using Autofac
- Map resources using AutoMapper
- Async/Await Best Practices
- Versioning Management
- Using Swagger (Swashbuckle)
- Auto Document Generator for Swagger
- Integrate Swagger and Versioning
- Integrate Swagger and JWT/OAuth Authentication
- Best Practices for Performance and Security
Garbage Collection ها در سی شارپ
معرفی Roslyn Tools
C# 8.0 - Async Streams
‘AsyncEnumerableReader’ reached the configured maximum size of the buffer when enumerating a value of type ‘<type>’. This limit is in place to prevent infinite streams of ‘IAsyncEnumerable<>’ from continuing indefinitely. If this is not a programming mistake, consider ways to reduce the collection size, or consider manually converting ‘<type>’ into a list rather than increasing the limit.
برای تنظیم یا تغییر آن میتوان از خاصیت MvcOptions.MaxIAsyncEnumerableBufferLimit در برنامههای ASP.NET Core استفاده کرد.
Here are some of the reasons why nullable reference types are less than ideal:
- Invoking a member on a null value will issue a System.NullReferenceException exception, and every invocation that results in a System.NullReferenceException in production code is a bug. Unfortunately, however, with nullable reference types we “fall in” to doing the wrong thing rather than the right thing. The “fall in” action is to invoke a reference type without checking for null.
- There’s an inconsistency between reference types and value types (following the introduction of Nullable<T>) in that value types are nullable when decorated with “?” (for example, int? number); otherwise, they default to non-nullable. In contrast, reference types are nullable by default. This is “normal” to those of us who have been programming in C# for a long time, but if we could do it all over, we’d want the default for reference types to be non-nullable and the addition of a “?” to be an explicit way to allow nulls.
- It’s not possible to run static flow analysis to check all paths regarding whether a value will be null before dereferencing it, or not. Consider, for example, if there were unmanaged code invocations, multi-threading, or null assignment/replacement based on runtime conditions. (Not to mention whether analysis would include checking of all library APIs that are invoked.)
- There’s no reasonable syntax to indicate that a reference type value of null is invalid for a particular declaration.
- There’s no way to decorate parameters to not allow null.