استفاده از کتابخانه MediatR برای پیاده سازی DomainEventها در پروژه های ASP.NET Core
301, MovedPermanently
https://ardalis.com/using-mediatr-in-aspnet-core-apps icon

I’ve started looking at using MediatR for my domain events implementations. To that end, I created a quick sample project using ASP.NET Core 2.0. Overall things were pretty easy to get going. If you haven’t used MediatR before, or if you’re looking for a quick intro on how to set it up for ASP.NET Core, keep reading (if not, how did you get here? Was the title not clear?). 

استفاده از کتابخانه MediatR برای پیاده سازی DomainEventها در پروژه های ASP.NET Core
بررسی مباحث مرتبط با Versioning اسمبلی ها در پروژه های ‏‎.NET Core
200, OK
https://andrewlock.net/version-vs-versionsuffix-vs-packageversion-what-do-they-all-mean/ icon

In this post I look at the various different version numbers you can set for a .NET Core project, such as Version, VersionSuffix, and PackageVersion. For each one I'll describe the format it can take, provide some examples, and what it's for. 

بررسی مباحث مرتبط با Versioning اسمبلی ها در پروژه های ‏‎.NET Core
صدور Exception یا بازگشت Result به عنوان خروجی متد، برای رسیدگی به خطاها
200, OK
https://enterprisecraftsmanship.com/2017/03/13/error-handling-exception-or-result/ icon

Summary

It’s pretty easy to differentiate use cases for Result and exceptions. Whenever the failure is something you expect and know how to deal with – catch it at the lowest level possible and convert into a Result instance. If you don’t know how to deal with it – let it propagate and interrupt the current business operation. Don’t catch exceptions you don’t know what to do about. 

صدور Exception یا بازگشت Result به عنوان خروجی متد، برای رسیدگی به خطاها
کتابخانه CSharpFunctionalExtensions
200, OK
https://github.com/vkhorikov/CSharpFunctionalExtensions icon
تفاوت اعتبارسنجی ورودی ها با اعتبارسنجی مرتبط با قواعد تجاری
200, OK
https://ayende.com/blog/2278/input-validation-vs-business-rules-validation icon

Input Validation for me is about validating the user input. Some people call "Name must not be empty" a business rule, I think about it as input validation. Business Rules validation is more complex, because a business rule for me is not "Name must not be empty", it is a definition of a state in the system that requires an action. Here is a definition of a business rule:

An order should be payed within 30 days, this duration can be extended, to a maximum of three times. 

تفاوت اعتبارسنجی ورودی ها با اعتبارسنجی مرتبط با قواعد تجاری
موجودیت های مرتبط با مدیریت قابلیت ها و نسخه ها در یک سیستم License Management
200, OK
https://gist.github.com/rabbal/2c812b44323efdc7522a202795f0d58f icon

اگر قصد راه اندازی سیستمی برای تولید مجوز استفاده از محصولات خود برای مشتریان خود را دارید، حداقل می‌توان موجودیت‌های موجود در این gist را در نظر گرفت و در نهایت در فایل License نهایی تولید شده برای مشتری خود با توجه به نسخه خریداری شده توسط او، قابلیت‌های نسخه مورد نظر نیز در فایل مذکور ثبت خواهند شد.

در راه حل ارائه شده علاوه بر اینکه امکان تنظیم یکسری قابلیت برای نسخه‌ها (Edition ها) وجود دارد، می‌توان برای مشتری خاصی قابلیت خاصی را به صورت مستقیم نیز در نظر گرفت.






موجودیت های مرتبط با مدیریت قابلیت ها و نسخه ها در یک سیستم License Management
موجودیت های مرتبط با مدیریت دسترسی های پویا
200, OK
https://gist.github.com/rabbal/ac15297c6bdec57932db4bf3a7e1efce icon

راه حل‌های مختلفی برای مدیریت دسترسی‌های پویا وجود دارد که باتوجه به Domain ای که در آن قرار داریم میتوانند مورد استفاده قرار بگیرند و در این رابطه مطالب زیادی هم ارائه شده است؛ در این راستا یکی از راه حل هایی که در یکی سیستم‌ها استفاده کرده ایم را در این gist می‌توانید مشاهده کنید.

در راه حل ارائه شده، علاوه بر این که امکان اعطای یکسری دسترسی برای گروه‌های کاربری وجود دارد، می‌توان دسترسی هایی را به صورت مستقیم برای کاربر خاصی نیز اعطاء کرد یا یکسری از دسترسی‌های کاربر را که از طریق گروه‌های کاربری خود دارا می‌باشد را از او گرفت و ...

public static class PermissionNames
{
    public const string Pages = nameof(Pages);
    public const string Pages_Administration = nameof(Pages_Administration);
    public const string Pages_Administration_Roles = nameof(Pages_Administration_Roles);
    public const string Pages_Administration_Roles_Create = nameof(Pages_Administration_Roles_Create);
    public const string Pages_Administration_Roles_Edit = nameof(Pages_Administration_Roles_Create);
    public const string Pages_Administration_Roles_Delete = nameof(Pages_Administration_Roles_Create);
    public const string Pages_Administration_Users = nameof(Pages_Administration_Users);
    public const string Pages_Administration_Users_Create = nameof(Pages_Administration_Users_Create);
    public const string Pages_Administration_Users_Edit = nameof(Pages_Administration_Users_Create);
    public const string Pages_Administration_Users_Delete = nameof(Pages_Administration_Users_Create);
    //...
}
موجودیت های مرتبط با مدیریت دسترسی های پویا