کار با Expression Tree در سی شارپ
308, PermanentRedirect
https://tyrrrz.me:443/blog/expression-trees/ icon


میشه گفت یکی از advanced‌ترین قسمت‌های دات نت، مفهوم Expression Tree و کلاس Expression هست که یه جورایی قلب IQueryable رو هم تشکیل میده

شاید نهایت استفاده افراد، کار با <<Expression<Func برای شرط‌های predicate بر روی متد Where و یا selector برای متد Select باشه

ولی Expression خیلی بزرگتر از اینهاست 

توضیح مفهوم Expression Tree طولانیه اگه میخواین بیشتر باهاش اشنا بشین قبلا اینجا یه پست نوشتم براش.

لینک اشتراک جاری هم یکی از بهترین مقالاتی که این مفهوم رو به خوبی به همراه مثال توضیح داده

کار با Expression Tree در سی شارپ
ساخت پویای عبارات LINQ
200, OK
https://blog.jeremylikness.com/blog/dynamically-build-linq-expressions/ icon

چگونه رشته‌ی JSON زیر را تبدیل به یک عبارت LINQ کنیم؟ (ساخت یک گزارش ساز پویا)

{
  "condition": "and",
  "rules": [
    {
      "label": "Category",
      "field": "Category",
      "operator": "in",
      "type": "string",
      "value": [
        "Clothing"
      ]
    },
    {
      "condition": "or",
      "rules": [
        {
          "label": "TransactionType",
          "field": "TransactionType",
          "operator": "equal",
          "type": "boolean",
          "value": "income"
        },
        {
          "label": "PaymentMode",
          "field": "PaymentMode",
          "operator": "equal",
          "type": "string",
          "value": "Cash"
        }
      ]
    },
    {
      "label": "Amount",
      "field": "Amount",
      "operator": "equal",
      "type": "number",
      "value": 10
    }
  ]
}
ساخت پویای عبارات LINQ
IQueryable و طراحی‌های نشتی‌دار
200, OK
https://blog.ploeh.dk/2012/03/26/IQueryableTisTightCoupling/ icon
public interface IRepository
{
    IQueryable<T> Query<T>();
}
Programmers who define such interfaces invariably have a specific ORM in mind, and they implicitly tend to stay within the bounds they know are safe for that specific ORM. This is a leaky abstraction .  
IQueryable و طراحی‌های نشتی‌دار
کتاب Getting the Most from LINQPad Succinctly
301, MovedPermanently
https://www.syncfusion.com/ebooks/getting-the-most-from-linqpad-succinctly icon

LINQPad is a powerful testing tool for all .NET developers that can help them deliver solutions in less time. In Getting the Most from LINQPad Succinctly, returning Succinctly series author José Roberto Olivas Mendoza lays out different ways to extend the functionality built into LINQPad. In this ebook, you’ll learn how to use LINQPad to query Entity Framework models in Visual Studio, how to work with the LINQPad command-line utility, how to write your own extensions and visualizers, and how to write custom data context drivers.

TABLE OF CONTENTS
  • A Quick Tour of LINQPad

  • LINQPad and Entity Framework

  • LINQPad Scripting

  • LINQPad Extensibility

  • Custom Data Context Drivers

کتاب Getting the Most from LINQPad Succinctly
کتابخانه LinqFaster : افزایش پرفرمنس عملیات Linq
200, OK
https://github.com/jackmott/LinqFaster icon

LinqFaster 

High performance Linq-style extension methods for arrays and lists.

متد‌های کمکی Linq با پرفرمنس بالا

LinqFaster.SIMD 

High performance Linq-style extension methods that use System.Numerics SIMD for arrays and lists.

متد‌های کمکی Linq با پرفرمنس بالا با استفاده از تکنولوژی SIMD  و ^

LinqFaster.Parallel 

Provides multithreaded Linq-Like extensions for arrays and lists.

متد‌های کمکی Linq با پرفرمنس بالا با استفاده از پردازش موازی/Multi-Threading

LinqFaster.SIMD.Parallel 

High performance Linq-style extension methods that are multithreaded and use System.Numerics SIMD for arrays and lists.

متد‌های کمکی Linq با پرفرمنس بالا با استفاده از تکنولوژی SIMD و پردازش موازی/Multi-Threading  

کتابخانه LinqFaster : افزایش پرفرمنس عملیات Linq