Immutability comes with a lot of benefits, but sometimes it can be a bit cumbersome to deal with when you only want to update some properties. Since the object is immutable, you need to create a copy with all the existing values and the new updated one.
I will show you how Records in C# 9 will greatly simplify this
Today, the Entity Framework Core team announces the second preview release of EF Core 6.0.
This release includes changes to handling the synchronization context when SaveChangesAsync
is called, smoother integration with System.Linq.Async
, updates to string concatenation and improvements to free text search.
معرفی EfCore.InMemoryHelpers
Entity Framework Core 2.0 introduces global query filters that can be applied to entities when a model is created. It makes it easier to build multi-tenant applications and support soft deleting of entities. This blog post gives a deeper overview of how to use global query filters in real-life applications and how to apply global query filters to domain entities automatically.
ASP.NET MVC #17
عنوان خطا: The anti-forgery token could not be decrypted
جزئیات خطا
The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.Mvc.HttpAntiForgeryException: The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
موارد مشابه در سایر انجمنها : اینجا و اینجا و ...
نتیجه حاصله: درج MachinKey در WebConfig برای مثال:
<system.web> <machineKey validationKey="mykey" decryptionKey="myotherkey" validation="SHA1" decryption="AES" /> </system.web>
افزونهای برای نمایش رشتههای منابع
2.Visual Studio 2017 15.6 منتشر شد
These are the customer-reported issues addressed in this release:
- "Specified argument out of the range of valid values, parameter name: count"
git
tags. - Cannot open git commit details.
- VS2017 Installer crashes on Modify when SyncFusion WPF Templates are installed.
- Test Explorer loses position when tests are run.
- Test explorer test hierarchy constantly jumps to top.
- XAML editor always crashes when a change is made to the XAML file.
- Test Explorer keeps scrolling to the top when a new test starts.
- Viewing Git History shows: specified argument was out of range of values.
- Alt+Up/Down does not reposition file in .NET Framework projects.
- VS 15.6 deadlocks on solution load for .NET Core SDK project when a 'None Include' is added to file list.
- 15.6 preview 6 discovers test adapter, but fails to run tests.
- Test Explorer keeps scrolling to the top when a new test starts.
- Microsoft Security Advisories for .NET Core updates.
Microsoft Security Advisories for .NET Core
CVE-2018-0875: Microsoft is aware of a security vulnerability in the public versions of .NET Core where a malicious file or web request could cause a denial of service (DoS) attack.
- System administrators are advised to update their .NET Core runtimes to versions 1.0.10, 1.1.7 or 2.0.6. Developers are advised to update their .NET Core SDK to versions 1.1.8 or 2.1.101.
حجم تقریبی بروزرسانی از نسخه 15.6.1 به 15.6.2 برابر 1.2GB میباشد
The missing scope - Tenant-Singleton
If a singleton is created once per application, you can probably guess that a tenant-singleton is created once per tenant.
So when might you need this scope? Think of any object that is expensive to create or needs to maintain state yet should be isolated for each tenant. Good examples would be NHibernate's Session Factory, RavenDB's Document Store or ASP.NET's Memory Cache.