نظرات مطالب
امن سازی برنامه‌های ASP.NET Core توسط IdentityServer 4x - قسمت پنجم - پیاده سازی ورود و خروج از سیستم
سلام؛ نحوه پیاده‌سازی این سیستم با کلاینت‌های که به زبانهای دیگری مثل PHP - Java - python و ... پیاده‌سازی شده‌اند چگونه است؟
نظرات مطالب
Blazor 5x - قسمت هفتم - مبانی Blazor - بخش 4 - انتقال اطلاعات از کامپوننت‌های فرزند به کامپوننت والد
یک نکته‌ی تکمیلی: نیاز به دقت در ویژگی «captured into the closure» در حلقه‌های Blazor

برای مثال حلقه‌ی زیر را در نظر بگیرید:
@for( int c = 0; c < 10; c++ )
{
   <li>
       <a href="#" @onclick="@(_=> OnLinkClicked(c))">@c</a>
   </li>
}
فکر می‌کنید پس از پایان این حلقه و رندر UI، اگر بر روی لینکی کلیک شد، چه مقداری به متد OnLinkClicked ارسال می‌شود؟
برخلاف تصور، با کلیک بر روی تمام لینک‌ها، فقط عدد ثابت 10 به متد  OnLinkClicked ارسال می‌شود. علت آن، همان نکات مطلب «بررسی مفهوم Captured Variable در زبان سی شارپ» است که در حین تشکیل حلقه‌های Blazor هم صادق هستند.
برای رفع این مشکل، از یکی از دو روش زیر می‌توان استفاده کرد:
Capture متغیر داخل حلقه:
@for( int c = 0; c < 10; c++ )
{
   var current = c;
   <li>
       <a href="#" @onclick="@(_=> OnLinkClicked(current))">@current</a>
   </li>
}
و یا ایجاد یک حلقه‌ی foreach بر روی یک Enumerable:
@foreach(var c in Enumerable.Range(0,10))
{
   <li>
       <a href="#" @onclick="@(_=> OnLinkClicked(c))">@c</a>
   </li>
}
اشتراک‌ها
نگاهی به مشخصات SQL Server 2019

SQL Server 2019 is designed to solve challenges of the modern data professional including:

  • Store enterprise data in a data lake and offer SQL and Spark query capability overall data
  • Reduce the need for Extract, Transform, and Load (ETL) applications by eliminating data movement
  • Integrate and secure machine learning applications with scalable performance
  • Reduce the need for application and query changes to gain a boost in performance
  • Increase confidential computing of data through hardware enclaves
  • Increase application and database uptime and availability through features like ADR (Advanced Database Recovery)
  • Extend the power of the T-SQL language in a secure and robust fashion
  • Run applications and deploy databases across multiple operating systems and platforms with compatibility
  • Reduce the risk of upgrades while using new SQL capabilities when you are ready though inbuilt database compatibility levels 
نگاهی به مشخصات SQL Server 2019
نظرات مطالب
وی‍‍ژگی های پیشرفته ی AutoMapper - قسمت دوم
attribute‌های مدل مانند Display را چرا وقتی Map میکنیم نمیاره؟

به طور مثال در صورتی میاره که به شکل زیر باشه
public class Customer
  {
    public Customer()
    {
      Orders = new List<Order>();
    }
    [StringLength(10)]
    public string Title { get; set; }

    [Display(Name = "نام")]
    public string FirstName { get; set; }

    [Display(Name = "نام خانوادگی")]
    public string LastName { get; set; }
    public ICollection<Order> Orders { get; set; }
}

public class CustomerViewModel
{
    public Customer Customer{ get; set; }
}


اشتراک‌ها
نگاهی سریع به فریم ورک های MVVM

One year ago MVVM wasn’t very famous. I remember the first article I read about it, about using MVVM to simplify the management of treeview controls. In the last six months, MVVM has been quickly promoted to THE methodology to use when developing WPF applications. During this amount of time, famous WPF developers started to merge their existing MVVM classes into libraries. Those libraries are now known as MVVM frameworks and contain classes designed to help developers to use MVVM in their projects 

نگاهی سریع به فریم ورک های MVVM
اشتراک‌ها
VSCode برای توسعه دهندگان سی‌شارپ

VSCode for the C# Developer - Tim Corey - NDC London 2023

VSCode is a nimble editor that can do just about anything. In this session, we will set up and configure VSCode for use in C# development. Then we will use it to build, debug, and deploy a small .NET Core web application to Azure.
Along the way, we will go over a list of the top C#-focused plugins for VSCode. Whether you are just getting started with VSCode or you are used to VSCode but want to start building C# projects, this session will get you up to speed fast. 

VSCode برای توسعه دهندگان سی‌شارپ
نظرات مطالب
Blazor 5x - قسمت یازدهم - مبانی Blazor - بخش 8 - کار با جاوا اسکریپت
امکان رندر کامل یک کامپوننت Blazor توسط کدهای جاوااسکریپتی در Blazor 6x

مرحله‌ی اول آماده سازی یک کامپوننت، جهت دسترسی به آن توسط کدهای جاوااسکریپتی، ثبت آن به نحو زیر در فایل Program.cs است:
builder.RootComponents.RegisterForJavaScript<Counter>(identifier: "counter");
البته نمونه‌ی blazor server آن به صورت زیر است:
builder.Services.AddServerSideBlazor(options =>
{
    options.RootComponents.RegisterForJavaScript<Counter>(identifier: "counter");
});
پس از آن، کدهای جاوااسکریپتی فراخوان کامپوننت Counter، به صورت زیر خواهند بود:
<button onclick="callCounter()">Call Counter</button>

<script>
  async function callCounter() {
     let containerElement = document.getElementById('my-counter');
     await Blazor.rootComponents.add(containerElement, 'counter', { incrementAmount: 10 });      
  }
</script>
 
<div id="my-counter">
</div>
که نتیجه‌ی نهایی این فراخوانی، در div ای با id مساوی my-counter، رندر خواهد شد. در اینجا نحوه‌ی ارسال پارامتری را نیز به این کامپوننت، مشاهده می‌کنید.