نظرات مطالب
کوئری نویسی در EF Core - قسمت ششم - کار با تاریخ و زمان
اگر جستجوی مدنظر چنین شکلی را داشته باشد:

مدلسازی نمونه‌ی آن به صورت زیر است:

    public class UIModel
    {
        public int PersianYear { set; get; }

        public int[] SelectedPersianMonths { set; get; }
    }
برای مثال اگر اطلاعات دریافتی از کاربر به صورت زیر باشد:
var model = new UIModel
{
    PersianYear = 1391,
    SelectedPersianMonths = new[] { 4, 5 }
};
کوئری گرفتن بر اساس ماه‌های انتخابی را (new DateTime را می‌توانید با پارامتر PersianCalendar تعریف کنید و ... کار می‌کند) باید بر اساس OR نوشت (حالت پیش‌فرض زنجیروار نوشتن Whereها And است):
var itemsQuery = context.Members.AsQueryable();

// Linq chaining where clauses as an `Or` instead of `And`
var predicate = PredicateBuilder.False<Member>();

foreach (var month in model.SelectedPersianMonths)
{
    var start = new DateTime(model.PersianYear, month, 1, new PersianCalendar());
    var end = new DateTime(model.PersianYear, month, month <= 6 ? 31 : 30, new PersianCalendar());

    // We can chain `IQueryable`s.
    // itemsQuery = itemsQuery.Where(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
    // But it will be translated as an `AND`, not `OR`

    predicate = predicate.Or(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
}

itemsQuery = itemsQuery.Where(predicate);

var items = itemsQuery.Select(x => new { x.FirstName, x.Surname }).ToList();
که یک چنین خروجی SQL ای را تولید می‌کند:
SELECT [m].[FirstName],
       [m].[Surname]
FROM   [Members] AS [m]
WHERE  ((CONVERT (DATE, [m].[JoinDate]) >= '2012-06-21T00:00:00')
        AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-07-21T00:00:00'))
       OR ((CONVERT (DATE, [m].[JoinDate]) >= '2012-07-22T00:00:00')
           AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-08-21T00:00:00'));
مثال کامل آن
نظرات مطالب
ساخت Nuget Manager شخصی
دستور ترکیبی get-package درنسخه بعدی nuget احتمالا 5 حذف خواهد شد و جایگزین آن Find-Package خواهد شد به شکل ساده ذیل
PM> Find-Package DNTCaptcha

Id                                  Versions                                 Description                                                                                                                       
--                                  --------                                 -----------                                                                                                                       
DNTCaptcha.Core                     {1.6.0}                                  DNTCaptcha.Core is a captcha generator and validator for ASP.NET Core applications.                                               
Abp.AspNetCore.NRCaptcha            {1.0.0}                                  通过 DNTCaptcha.Core 进行改写的...                                                                                                       
Time Elapsed: 00:00:00.3478514

اشتراک‌ها
کتابخانه ngx-page-scroll

Animated scrolling functionality for angular written in pure typescript with no additional dependencies  Demo

  • easy-to-use directive: scroll to an element referenced in the href-attribute (href="#mytarget) just by adding pageScrolldirective
  • service usage: trigger scroll animations from your component or when server responds
  • customizable: adjust duration, offset or whether scrolling stops if the user interrupts (read more)
  • use custom easing functions to calculate the scroll position over time
  • works across routes (scrolls to target element as soon as the routing has finished) and in both directions (horizontal/vertical) 
npm install ngx-page-scroll  
کتابخانه ngx-page-scroll
اشتراک‌ها
معرفی قابلیت Hot Restart زامارین

توسط این قابلیت در برنامه‌های زاماین، تغییرات کد، رفرنس ها، فایل‌ها و... نیاز به کامپایل کامل و مجدد نداشته و تغییرات را سریع‌تر اعمال کرده و برنامه را ریستارت می‌کند.

Today at .NET Conf 2019, we announced Xamarin Hot Restart which enables you to test changes made to your app, including multi-file code edits, resources, and references, using a much faster build and deploy cycle.

XAML Hot Reload for Xamarin.Forms already provides fast iteration on XAML UIs by enabling you to see changes applied live in your running application. But what about other types of code and project edits? Xamarin Hot Restart will apply these types of changes to your application and quickly restart your app for rapid application development.  

معرفی قابلیت Hot Restart زامارین
اشتراک‌ها
بهبودهای EF Core 2.1 در زمینه پشتیبانی از DDD

Entity Framework half-heartedly supported Domain-Driven Design patterns. But the new-from-scratch EF Core has brought new hope for developers to map your well-designed domain classes to a database, reducing the cases where a separate data model is needed. EF Core 2.1 is very DDD friendly, even supporting things like fully encapsulated collections, backing fields and the return of support for value objects. In this session, we'll review some well-designed aggregates and explore how far EF Core 2.1 goes to act as the mapper between your domain classes and your data store. 

بهبودهای EF Core 2.1 در زمینه پشتیبانی از DDD
اشتراک‌ها
کتابخانه uilang
A minimal, UI-focused programming language for web designers. With uilang, you write your code just like plain English, straight into your HTML using a <code> element. uilang's logic relies on manipulating classes on HTML elements and using these classes in CSS to show, hide, animate and transform elements when a click occurs. This simple logic lets designers create most of the typical user interface behaviours: tabs, popovers, overlays, sliding menus, etc.  Demo
کتابخانه uilang
نظرات مطالب
کار با وب سرویس جاوایی تشخیص ایمیل‌های موقتی در دات نت
با سلام و تشکر
در هنگام اجرای مثل با خطای زیر مواجه می‌شوم
An unhandled exception of type 'System.ServiceModel.ProtocolException' occurred in mscorlib.dll

Additional information: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 13 bytes of the response were: '<HTML></HTML>'.