اشتراک‌ها
وقتی هرچی که میدونی اشتباهه - قسمت اول
Finalizers are interesting and dangerous because they are an environment in which everything you know is wrong. I’ve written a lot about the perils of C# finalizers / destructors (either name is fine) over the years, but it’s scattered in little bits over the internet. In this series I’m going to try to get everything in one place; here are a bunch of things that many people believe about finalizers, all of which are wrong.
وقتی هرچی که میدونی اشتباهه - قسمت اول
اشتراک‌ها
وقتی هرچی که میدونی اشتباهه - قسمت دوم
Finalizers are interesting and dangerous because they are an environment in which everything you know is wrong. I’ve written a lot about the perils of C# finalizers / destructors (either name is fine) over the years, but it’s scattered in little bits over the internet. In this series I’m going to try to get everything in one place; here are a bunch of things that many people believe about finalizers, all of which are wrong.
وقتی هرچی که میدونی اشتباهه - قسمت دوم
اشتراک‌ها
اجرا کردن کد های جاوااسکریپت در برنامه های ASP.NET Core

Not many are familiar with this awesome feature of dotnet core. Aspnet team is actively maintaining a project named  JavascriptServices ; Along with other packages, it includes the NodeServices package. Using this package, one can easily create an instance of node and execute JavaScript code (function) in the backend. If you think of it right now, you can see that it actually opens up a wide variety of development opportunities. By opportunities, I mean; the ASP.NET core project is trying hard to make its package eco-system (NuGet) rich but while doing it, why not get advantages of other package eco-system as well, right? When I talk about other than nuget package manager, the first name that comes to my mind is Npm (node package manager). Npm is the largest package manager out there on this very day and its growing rapidly. By using NodeServices package, we can now use (not all of the npm packages but) most of the npm packages in our backend development. So, let me show you how to configure NodeServices in your aspnet core project and use it to execute JavaScript code on the backend.

 
اجرا کردن کد های جاوااسکریپت در برنامه های ASP.NET Core
اشتراک‌ها
آشنایی با NodeJS و MongoDB

Node.js is a rapidly growing technology that has been overtaking the world of server-side programming with surprising speed. MongoDB is a technology that’s revolutionizing database usage. Together, the two tools are a potent combination, thanks to the fact that they both employ JavaScript and JSON. 

آشنایی با NodeJS و MongoDB
نظرات مطالب
انجام کارهای زمانبندی شده در برنامه‌های ASP.NET توسط DNT Scheduler
سلام؛ وقتی در قسمت:
IoCWrapper.RunAndDispose(() =>
{
     var draftsService = IoCWrapper.GetInstance<IBlogPostDraftsService>();
     draftsService.RunConvertDraftsToPostsJob();
});
یک متد Async قرار می‌دم
IoCWrapper.RunAndDispose(async () =>
{
     var draftsService = IoCWrapper.GetInstance<IBlogPostDraftsService>();
     await draftsService.RunConvertDraftsToPostsJobAsync();
});
دفعه اول به درستی اجرا میشه، ولی دفعه دوم خطای زیر میده
System.ObjectDisposedException
  HResult=0x80131622
  Message=The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.
  Source=EntityFramework
نظرات مطالب
بازنویسی سطح دوم کش برای Entity framework 6
ظاهرا در حالت Lazy Loading زمانی که آبجکتی از کش لود میشه، پراپرتی‌های Navigation استثنای زیر را صادر میکنن:
The ObjectContext instance has been disposed and can no longer be used for operations that require a connection 
تیکه کدی که این ارور رو بر میگردونه:
var userInRoles = user.UserInRoles.Union(user.UsersSurrogate.Where(a => a.SurrogateFromDate != null && a.SurrogateToDate != null && a.SurrogateFromDate <= DateTime.Now && a.SurrogateToDate >= DateTime.Now).SelectMany(a => a.UserInRoles));
  result = userInRoles.Any(a => a.Role.FormRoles.Any(b => b.IsActive && (b.Select && b.Form.SelectPath != null && b.Form.SelectPath.ToLower().Split(',').Contains(roleName))));

اشتراک‌ها
لیست کاملی از سوئیچ‌های خط فرمان اجرای مرورگر کروم

List of Chromium Command Line Switches
There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2023-05-28.  

لیست کاملی از سوئیچ‌های خط فرمان اجرای مرورگر کروم
اشتراک‌ها
کنترولر های چاق در ASP.NET MVC!
What is fat controller ?
  • there is a lot of code that should be in some other layer,
  • controller has many methods for AJAX responses,
  • controller has many methods to return JSON data
کنترولر های چاق در ASP.NET MVC!
اشتراک‌ها
Json.NET 8.0 منتشر شد

To reduce allocations and memory usage when serializing Json.NET 8.0 adds a new IArrayPool interface. Json.NET is already very lean when it comes to allocations, working with raw characters on array buffers instead of allocated strings, but those buffers can easily grow large, and a new buffer is created each time JSON is read or written. IArrayPool allows array buffers to be reused, similar to connection pooling with a database, or thread pooling in .NET. 

Json.NET 8.0 منتشر شد