اشتراک‌ها
نگارش‌های 5.0.4, 3.1.13, 2.1.26 دات نت و NET Core. منتشر شدند

Today, we are releasing the .NET March 2021 Updates. These updates contains reliability and security improvements. See the individual release notes for details on updated packages.

You can download 5.0.4 , 3.1.13, 2.1.26 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64.

نگارش‌های 5.0.4, 3.1.13, 2.1.26 دات نت و NET Core. منتشر شدند
اشتراک‌ها
تغییرات Web API در دات نت 8

Preview 3 of .NET 8 includes a new project templates to create an API with a TODO service instead of the weather forecast . Looking into the generated code of this template, there are a lot more changes going on such as a slim builder and using a JSON source generator which helps when using AOT to create native .NET binaries. This article looks into the changes coming. 

تغییرات Web API در دات نت 8
اشتراک‌ها
کنترل امن استثنائات کنترل نشده در زبان های #C و VB.NET

Unhandled exceptions are a bit of a misnomer. In .NET, every exception is handled. By the time you access the specifics of an error in your Try-Catch block, the Framework has already analyzed the problem, built a structure to contain its details, examined the stack trace, and used reflection to pinpoint the location of the error, among other mundane tasks. In short, when errors occur, .NET serves them up to your code in a neatly packaged, highly examinable data block.

 
کنترل امن استثنائات کنترل نشده در زبان های #C و VB.NET
بازخوردهای دوره
استفاده از StructureMap به عنوان یک IoC Container

ممنون از را حلی که ارائه دادین، اشکال مربوطه رفع شد... مهندس جان حین اجرای برنامه و بدون استفاده از StructureMap حین اجرای برنامه کانکشن استرینگ رو تغییر میدم و از دیتابیسی به دیتابیس دیگه ای میرم و با تغییر متغییر و پارامتر مورد نظر کاملا جواب میده ولی وقتی با استفاده از StructureMap و روشی که فرمودین عمل میکنم اجازه سوئیچ روی دیتابیس دیگه رو نمی‌ده وتغییری هم درکانکشن استرینگ جدید ارسال شده به Context مربوطه مشاهده نمی‌شه . کاربر حتما نیاز به تغییر سال عملیاتی حین اجرای برنامه و یا دسترسی به اطلاعات سال عملیاتی همتا رو بدون خروج از سال عملیاتی جاری داره....

این error رو میده : 

The changes to the database were committed successfully, but an error occurred while
 updating the object context. The ObjectContext might be in an inconsistent state. Inner 
exception message: A referential integrity constraint violation occurred: The property values that 
define the referential constraints are not consistent between principal and dependent objects in the relationship.
اشتراک‌ها
شروع به کار با IdentityServer 6

Creating an IdentityServer 6 Solution

00:00 Self-Signed Certificate
04:40 Docker Compose
07:30 PostgreSQL Database
09:40 IdentityServer
1:15:30 API
1:40:15 Console Application
1:50:35 Web Application
2:07:10 Single-Page Application 

شروع به کار با IdentityServer 6
اشتراک‌ها
NET Framework 4.6.1. منتشر شد

The .NET Framework 4.6.1 includes new features in the following areas:

  • Cryptography

  • ADO.NET

  • Windows Presentation Foundation (WPF)

  • Windows Workflow Foundation

  • Profiling

  • NGen

For more information on the .NET Framework 4.6.1, see the following topics:

NET Framework 4.6.1. منتشر شد
اشتراک‌ها
MessagePack چیست؟

It's like JSON. but fast and small.

MessagePack is supported by over 50 programming languages and environments. 

//C#
// Creates serializer.
var serializer = SerializationContext.Default.GetSerializer<T>();

// Pack obj to stream.
serializer.Pack(stream, obj);

// Unpack from stream.
var unpackedObject = serializer.Unpack(stream);
MessagePack چیست؟