اشتراک‌ها
بهبودهای async در NET 6.

Among the over 100 API changes in .NET 6 are several features designed to make working with asynchronous code easier and safer. Here are some of the highlights. 

بهبودهای async در NET 6.
اشتراک‌ها
NET 6 Preview 5. منتشر شد

We’re now in the second-half of the .NET 6 release, and starting to see significant features coming together. A great example is .NET SDK Workloads, which is the foundation of our .NET unification vision and enables supporting more application types.  

NET 6 Preview 5. منتشر شد
اشتراک‌ها
jQuery 3.5.0 منتشر شد

The main change in this release is a security fix, and it’s possible you will need to change your own code to adapt. Here’s why: jQuery used a regex in its jQuery.htmlPrefilter method to ensure that all closing tags were XHTML-compliant when passed to methods. For example, this prefilter ensured that a call like jQuery("<div class='hot' />") is actually converted to jQuery("<div class='hot'></div>"). Recently, an issue was reported that demonstrated the regex could introduce a cross-site scripting (XSS) vulnerability. 

jQuery 3.5.0 منتشر شد
اشتراک‌ها
پیاده سازی الگوی ریپازیتوری و تزریق وابستگی در ado.net

Nowadays, I am trying to learn different design patterns in object oriented paradigm that are pretty useful to implement generic solutions for different scenarios. Few weeks ago for a job hunt, I got an assignment to do which was a web application that would interact with database, so I took it up as a challenge and decided to make it loosely coupled using design patterns which were applicable in that scenario.

 
پیاده سازی الگوی ریپازیتوری و تزریق وابستگی در ado.net
اشتراک‌ها
نحوه اضافه کردن چند پروژه در vs code

Visual Studio Code doesn't support solution files, whereas Visual Studio does. In Visual Studio we use solution files to link multiple projects together, and at first I thought that this was going to be a deal breaker for Visual Studio Code - but it's not at all. Many people aren't aware that Visual Studio Code, although lightweight, is a powerful editor that can do most of the things you need. 

نحوه اضافه کردن چند پروژه در vs code
اشتراک‌ها
Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp

MockHttp is a testing layer for Microsoft's HttpClient library. It allows stubbed responses to be configured for matched HTTP requests and can be used to test your application's service layer. 

var mockHttp = new MockHttpMessageHandler();

// Setup a respond for the user api (including a wildcard in the URL)
mockHttp.When("http://localhost/api/user/*")
        .Respond("application/json", "{'name' : 'Test McGee'}"); // Respond with JSON

// Inject the handler or client into your application code
var client = mockHttp.ToHttpClient();

var response = await client.GetAsync("http://localhost/api/user/1234");
// or without async: var response = client.GetAsync("http://localhost/api/user/1234").Result;

var json = await response.Content.ReadAsStringAsync();

// No network connection required
Console.Write(json); // {'name' : 'Test McGee'}


Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp
نظرات مطالب
آشنایی با TransactionScope
SaveChanges operates within a transaction. SaveChanges will roll back that transaction and
throw an exception if any of the dirty ObjectStateEntry objects cannot be persisted.
خود متد SaveChanges از تراکنش استفاده می‌کنه و کل تغییرات DbContext رو در طی یک تراکنش اعمال می‌کنه.
اشتراک‌ها
آنگولار متریال 1 منتشر شد

What makes 1.0 different from our pre-release builds?

  • Stable CSS and API surface.We're now confident in the API for these components and do not plan any breaking changes.
  • Supported platforms: Tested on IE 11+, Chrome, Safari, Firefox, Android 4.2+ and iOS 8+.
  • Angular 1.5-ready. You can use AngularJS 1.3 and later, but as soon as you update to the new release, you can be confident that ngMaterial components will continue to work as expected. 
آنگولار متریال 1 منتشر شد