اشتراک‌ها
پیاده سازی Drag ‘n’ Drop Shopping Cart With jQuery UI
Drag ‘n’ dropping items has its various popular uses and shopping carts are definitely one of them.
In this tutorial, we’ll be creating a simple shopping cart that works with drag ‘n’ drops.
It will have support for add-to-basket with quantity updates (so that the same items could be added more than once) and removing items from the basket.

Demo  Download
پیاده سازی Drag ‘n’ Drop Shopping Cart With jQuery UI
اشتراک‌ها
خواندن و نوشتن فایل CSV در #C
A common requirement is to have applications share data with other programs. Although there are interfaces available to work with, for example, Microsoft Excel data files, this approach is generally complex, involves a fair amount of overhead, and requires that support libraries accompany your application
خواندن و نوشتن فایل CSV در #C
نظرات مطالب
انجام کارهای زمانبندی شده در برنامه‌های ASP.NET توسط DNT Scheduler
این مسایل ربطی به این کتابخانه ندارد.
The unconfigured reference in each instance of Application Insights telemetry indicates that this application isn't associated with an ikey. The data that's generated while your app is running isn't sent to Azure. The data is available only for local search and analysis.
نظرات مطالب
ایجاد جداول بهینه سازی شده برای حافظه در SQL Server 2014
 موقع اجرای دستور  ALTER DATABASE SQL2014_Demo 
    ADD FILEGROUP MemFG CONTAINS MEMORY_OPTIMIZED_DATA 
GO 
این خطا رو میده لطفا راهنمایم کنید
Msg 534, Level 15, State 72, Line 37
'FILEGROUP ... CONTAINS MEMORY_OPTIMIZED_DATA' failed because it is not supported in the edition of this SQL Server instance 'TFS-SERVER'. See books online for more details on feature support in different SQL Server editions.
نظرات مطالب
T4MVC : یکی از الزامات مدیریت پروژه‌های ASP.NET MVC
اگر علاقمند هستید که اخبار آن‌را دنبال کنید نیاز است سورس کنترل آن‌را مرور کنید:
http://t4mvc.codeplex.com/SourceControl/list/changesets
24cc121c697f, by Michael Swain, Oct 22 8:39 PM

XmlSettings Patch

Patch to modify T4MVC to use an XML settings file instead of a static
include. This allows for future compatability as long as setting types
do not change.
نام جدید آن T4MVC.tt.settings.xml شده.
+ این فایل به همراه بسته NuGet آن نیست و باید از سورس کنترل دریافت شود (داخل پوشه T4MVCHostMvcApp\T4MVC Files).
اشتراک‌ها
شبیه سازی OAuth2 با Dev Proxy
Achieve more with APIs in your organization. We’re excited to share with you a new version of Dev Proxy that helps you to build robust apps connected to APIs.
In this version:
  • Easily simulate authentication and authorization using API keys and OAuth2
  • Quickly generate JWT tokens for testing
  • …and more!

شبیه سازی OAuth2 با Dev Proxy
اشتراک‌ها
طراحی Entity پایه برای کلاس های Domain

How you shouldn’t implement base classes

public class Entity<T>
{

  public T Id { get; protected set; }

}

Motivation for such code it pretty clear: you have a base class that can be reused across multiple projects. For instance, if there is a web application with GUID Id columns in the database and a desktop app with integer Ids, it might seem a good idea to have the same class for both of them. In fact, this approach introduces accidental complexity because of premature generalization. 

There is no need in using a single base entity class for more than one project or bounded context. Each domain has its unique path, so let it grow independently. Just copy and paste the base entity class to a new project and specify the exact type that will be used for the Id property. 

طراحی Entity پایه برای کلاس های Domain
اشتراک‌ها
مدیریت مباحث همزمانی مرتبط با یک Rich Domain Model با استفاده از EFCore و الگوی Aggregate

In summary, the most important issues here are:

  • The Aggregate’s main task is to protect invariants (business rules, the boundary of immediate consistency)
  • In a multi-threaded environment, when multiple threads are running simultaneously on the same Aggregate, a business rule may be broken
  • A way to solve concurrency conflicts is to use Pessimistic or Optimistic concurrency techniques
  • Pessimistic Concurrency involves the use of a database transaction and a locking mechanism. In this way, requests are processed one after the other, so basically concurrency is lost and it can lead to deadlocks.
  • Optimistic Concurrency technique is based on versioning database records and checking whether the previously loaded version has not been changed by another thread.
  • Entity Framework Core supports Optimistic Concurrency. Pessimistic Concurrency is not supported
  • The Aggregate must always be treated and versioned as a single unit
  • Domain events are an indicator, that state was changed so Aggregate version should be changed as well 
public class AggregateRootBase : Entity, IAggregateRoot
{
    private int _versionId;

    public void IncreaseVersion()
    {
        _versionId++;
    }
}
internal sealed class OrderEntityTypeConfiguration : IEntityTypeConfiguration<Order>
{
    public void Configure(EntityTypeBuilder<Order> builder)
    {
        builder.Property("_versionId").HasColumnName("VersionId").IsConcurrencyToken();
 
        //...
    }
}
var order = await _ordersContext.Orders.FindAsync(orderId);
order.AddOrderLine(request.ProductCode); 
var domainEvents = DomainEventsHelper.GetAllDomainEvents(order);
if (domainEvents.Any())
{
    order.IncreaseVersion();
}
await _ordersContext.SaveChangesAsync();


مدیریت مباحث همزمانی مرتبط با یک Rich Domain Model با استفاده از EFCore و الگوی Aggregate