نظرات مطالب
آشنایی با Implicit Casting و Explicit Casting
مطلب جالبی است که کمتر مورد استفاده قرار می‌گیره. شاید ذکر مثال‌های دنیای واقعی اون در اینجا مکمل خوبی باشه. اگر دوستان هم مثالی مدنظرشون بود، لطفا عنوان کنند.
An easier way to manage INotifyPropertyChanged
Custom Explicit and Implicit Operators in C#
Why does this code work?
ASP.NET MVC Model binding with implicit operators
Forgotten C# language features: implicit operator  
How to fake Enums in EF 4 
اشتراک‌ها
دوره بررسی تازه‌های ASP.NET 5 از Tuts plus
ASP.NET is almost 15 years old and it has evolved to become a flexible and extremely powerful platform. But 15 years is a long time, especially in the world of web technology, and the folks at Microsoft knew it was time to change ASP.NET. In this course, Envato Tuts+ instructor Jeremy McPeak will walk you through the major changes to ASP.NET in version 5. Along the way, you'll see how these changes will affect your project and how the new features can make your life as a developer easier. You'll also get a first look at the new Tag Helpers, inversion of control and dependency injection features, with practical examples.
دوره بررسی تازه‌های ASP.NET 5 از Tuts plus
نظرات مطالب
بررسی خطاهای ممکن در حین راه اندازی اولیه برنامه‌های ASP.NET Core در IIS
یک نکته‌ی تکمیلی: دریافت خطای «HTTP Error 500.30 - ANCM In-Process Start Failure» پس از فعالسازی هاست درون پروسه‌ای از نگارش 2.2 به بعد
در نگارش فعلی این ماژول درون پروسه‌ای، متد Directory.GetCurrentDirectory بجای اینکه مسیر برنامه را باز گرداند، مسیر C:\windows\system32\inetsrv یا همان پروسه‌ی IIS را بر می‌گرداند و باید به این موضوع دقت داشت. برای مثال ممکن است مسیر بانک اطلاعاتی برنامه پیدا نشود و یا فایل تنظیمی قابل خواندن نباشد. چند مثال از این نوع: - ASP.NET Core Configuration Issue with In Process Hosting   

و یا کلا آن‌را در فایل csproj خاموش کنید (هر چند اگر SDK متناسبی را نصب کرده باشید (آخرین نگارش پایدار آن‌را)، این مشکل نباید وجود داشته باشد):
Change this section ...

<PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>

to the following ...

<PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
  </PropertyGroup>
اشتراک‌ها
نحوه توزیع یک Angular component به npm

In this post I’ll quickly explain the minimum you need to know in order to publish an Angular component to npm. By the end of the post you’ll know how your module to: 

  • Be platform independent (i.e. run in Web Workers, Universal).
  • Should be bundled and distributed.
  • Work with the Angular’s Ahead-of-Time compiler.
  • Play well with TypeScript and allow autocompletion and compile-time type checking. 
نحوه توزیع یک Angular component به npm
اشتراک‌ها
کتاب Visual Studio 2015 Succinctly

In Visual Studio 2015 Succinctly, author Alessandro Del Sole explains how to take advantage of the highly anticipated features in Microsoft Visual Studio 2015. Topics include sharing code between different types of projects, new options for debugging and diagnostics, and improving productivity with other services in the Visual Studio ecosystem, such as NuGet and Azure.

کتاب Visual Studio 2015 Succinctly
مطالب
معرفی REST CLIENT توکار ویژوال استودیو 2022
یکی از امکاناتی که Visual Studio 2022 به ما میدهد، یک REST CLIENT توکار است که با آن میتوانیم بدون Swagger، Post Man یا ابزار‌های مشابه، Api‌های خود را تست کنیم.

برای استفاده از آن، ابتدا یک پروژه‌ی Api را داخل ویژوال استودیو با تنظیمات پیشفرض آن ایجاد میکنیم که شامل یک Controller به نام WeatherForecast است. سپس یک پوشه را درون آن با نامی دلخواه ایجاد میکنیم و داخل آن، یک فایل جدید را با پسوند http میسازیم.

 سپس این فایل http را باز می‌کنیم. اگر شروع به تایپ کردن کنیم، میتوانیم ببینیم که intellisense به ما http method‌های مختلف را نشان میدهد و میتوانیم از آنها استفاده کنیم. برای مثال یک درخواست Get را ایجاد میکنم:
GET https://localhost:7092/WeatherForecast
حال پروژه را اجرا میکنیم و بر روی فلش سبز رنگی که کنار درخواست ایجاد شده، کلیک میکنیم تا درخواست اجرا شود:

 
در اینجا میتوانیم تعدادی متغیر را نیز تعریف کرده و از آنها استفاده کنیم:
@hostname = localhost
@port = 7092
@host = {{hostname}}:{{port}}

GET https://{{host}}/WeatherForecast


حال میخواهیم یک درخواست Post را ایجاد و ارسال کنیم. برای این منظور ابتدا داخل کنترلر WeatherForecast، یک اکشن متد Post را ایجاد میکنیم که در این مثال کاری با دیتای وارد شده نمیکند و فقط آنرا بازگشت می‌دهد:
[HttpPost]
public ActionResult Post(WeatherForecast weatherForecast)
{
    //Code ...
    return Ok(weatherForecast);
}
اکنون میتوانیم مانند زیر یک درخواست Post را با بدنه‌ی json ایجاد کنیم:
@hostname = localhost
@port = 7092
@host = {{hostname}}:{{port}}
@contentType = application/json

POST https://{{host}}/WeatherForecast
Content-Type:{{contentType}}

{
  "date": "2023-03-29",
  "temperatureC": 30,
  "summary": "Hot"
}
نکته: حتما به فاصله‌ی بین Content-Type و براکت‌های بدنه‌ی درخواست، دقت کنید.

به این مورد دقت داشته باشید که برای داشتن چند درخواست در یک فایل، برای جدا کردن آنها از هم باید از ### استفاده کنید:
@hostname = localhost
@port = 7092
@host = {{hostname}}:{{port}}
@contentType = application/json


GET https://{{host}}/WeatherForecast

###

POST https://{{host}}/WeatherForecast
Content-Type:{{contentType}}

{
  "date": "2023-03-29",
  "temperatureC": 30,
  "summary": "Hot"
}
اشتراک‌ها
کتاب رایگان Scala Succinctly

Learning a new programming language can be a daunting task, but Scala Succinctly makes it a simple matter. Author Chris Rose guides readers through the basics of Scala, from installation to syntax shorthand, so that they can get up and running quickly.

Table of Contents
  1. Introduction
  2. Variables and Values
  3. Expressions and Functions
  4. Control Structures
  5. Arrays and Lists
  6. Other Collection Types
  7. Classes and Objects
  8. Pattern Matching
  9. Closures
  10. Conclusion 
کتاب رایگان Scala Succinctly
اشتراک‌ها
رکورد های سی شارپ چگونه زندگی مرا تغییر خواهد داد

Immutability comes with a lot of benefits, but sometimes it can be a bit cumbersome to deal with when you only want to update some properties. Since the object is immutable, you need to create a copy with all the existing values and the new updated one.

I will show you how Records in C# 9 will greatly simplify this

رکورد های سی شارپ چگونه زندگی مرا تغییر خواهد داد