EF Code First #10
What’s new?
The following new features are available for preview in this release:
- URL Rewriting middleware
- Response caching middleware
- Response compression middleware
- WebListener server
- View Components as Tag Helpers
- Middleware as MVC filters
- Cookie-based TempData provider
- View compilation
- Azure App Service logging provider
- Azure Key Vault configuration provider
- Redis and Azure Storage Data Protection Key Repositories
jQuery 3.7.0 منتشر شد
Bootstrap 5.2.1 منتشر شد
سری «سلامت کد» از گوگل
Issues fixed in Visual Studio 2019 version 16.0.4
- Attach to iis prompt to attach multiple times.
- WPF applications broken after FW 4.8 update.
- installing typescript 3.3 disables version 2.2 compilation.
- Unable to attach debugger when attaching multiple startup projects on Visual Studio 2019.
- Known issue: Application tab of VB project property pages is broken when isntalling the .NET Framework 4.8 Developer Pack.
- Visual Studio extensions may fail to install attempting to overwrite core NuGet files.
- microsoft.diagnosticshub.dotnetobjectalloc.vsix missing from offline installer.
Security Advisory Notices
CVE-2019-0727 Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability
An elevation of privilege vulnerability exists when the Diagnostics Hub Standard Collector Service improperly performs certain file operations. An attacker who successfully exploited this vulnerability could delete files in arbitrary locations. To exploit this vulnerability, an attacker would require unprivileged access to a vulnerable system. The security update addresses the vulnerability by securing locations the Diagnostics Hub Standard Collector performs file operations in.
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.