In this article, the author delves into the intricacies of the Entity Framework codebase, uncovering 168 instances that require optimization to boost performance. Explore the valuable insights and strategies for fine-tuning your Entity Framework application to ensure it operates at its peak efficiency.
Category: C#
Rockin’ the Code World Season 4: Special Guest Mads Torgersen
Join the 4th season premiere of C# Corner TV with host, David McCarter, on October 7th, 2023, at 10:00 PST. The special guest is Mads Torgersen, Principal Architect on the Microsoft .NET team and lead designer of the C# language. The episode will feature a discussion about .NET 8, a Q&A, and links for further resources.
Microsoft .NET Code Analysis: Properly Formatting Class Files
The article discusses the importance of consistent formatting in Microsoft .NET class files for improved code readability and collaboration among developers. It provides tips on how to set up formatting rules using Visual Studio's features and the EditorConfig file, covering various formatting options such as new lines, indentation, spacing, and wrap preferences. The article also highlights the use of CodeRush, a code refactoring tool, to enhance code formatting and organization.
Ensuring Robustness with Bulletproof Disposable Types in Microsoft .NET
The article emphasizes the importance of proper handling of disposable objects in .NET projects to avoid memory-related issues. It discusses the creation of "bulletproof" disposable types using extension methods, such as TryDispose() for local variables, DisposeFields() for managing disposable fields, and DisposeCollection() for handling disposable objects in collections. Additionally, the author recommends using a memory profiler, specifically ".NET Memory Profiler" by SciTech Software AB, to ensure there are no virtual memory leaks in the application before deployment.
Microsoft .NET Code Analysis: Random Is an Insecure Random Number Generator
The article discusses a security vulnerability in the use of the Random class for generating random numbers in .NET and recommends switching to the more secure RandomNumberGenerator for cryptographic and security-critical applications. The RandomNumberGenerator not only provides better security but also offers superior randomness and significant performance improvements in .NET 8. Updated September 2023.
Microsoft .NET Code Analysis: Simplify the New Expression for C#
The article discusses the introduction of a simplified new expression syntax in .NET 5, which allows for more concise and readable object initialization. The new syntax offers advantages such as reduced boilerplate code, improved readability, support for immutable types, and enhanced IDE integration.
Real World Coding Issues: Part 3 – Design, Diagnostics, and Other Common Code Issues
The article discusses real-world coding issues encountered in a contract project. Part 3 covers common coding issues related to design, diagnostics, and other areas, such as globalization, code duplication, and Linux-based development challenges. It emphasizes the importance of code quality, performance, and prioritizing code reviews to ensure a maintainable and efficient solution.
Microsoft .NET Code Analysis: Use Auto-Implemented Property
The article discusses the use of auto-implemented properties in Microsoft .NET code analysis. While the author generally advises against their excessive use, they highlight a real-world example where utilizing an auto-implemented property is advantageous due to its conciseness, readability, encapsulation, and ease of maintenance. The author recommends using tools like CodeRush from DevExpress to streamline the refactoring process.
Coding Faster with dotNetTips.com Spargine 6: Aug 2023 Release
Spargine 6 (v2023.6.8.1) is now available, an open-source project offering NuGet packages for .NET 6 & 7 with new classes, methods, and significant speed improvements. The release introduces a custom result type for method returns, offering an alternative to exceptions, empowering software engineers to boost application performance.
Microsoft .NET Code Analysis: Ensuring Proper Resource Management – Implementing IDisposable for Disposable Objects
One persistent issue I have noticed throughout my experience working on projects for the past 12 years is the improper handling of disposable objects and the lack of implementation of IDisposable for types with disposable fields. Failing to handle these objects correctly can lead to virtual memory leaks and subsequently bring down applications and services. Unfortunately, this problem occurs far too frequently.

You must be logged in to post a comment.