Author: Mayur Lohite
-
![How the [Remote] Attribute Enhanced Our Registration Flow in ASP.NET Core](https://editor.mudmatter.com/wp-content/uploads/2026/03/Remote-Attribute.png)
How the [Remote] Attribute Enhanced Our Registration Flow in ASP.NET Core
How the [Remote] Attribute Enhanced Our Registration Flow in ASP.NET Core In one of our production ASP.NET Core MVC projects, we faced a frustrating issue: users frequently submitted the registration form only to receive the message “Email already exists” after clicking Submit. While technically accurate, this was a poor user experience. To address this, we…
-

Fixing Security issues raised by Veracode in .NET Core MVC
Fixing Security issues raised by Veracode in .NET Core MVC Static Analysis tools like Veracode don’t just point out problems they force us to write better, safer code. In .NET Core MVC projects, I often see the same security issues repeated, especially in fast-moving teams. Here are 3 real Veracode scenarios I’ve fixed recently and…
-

Are you confused in AddTransient() and AddScoped()? In .NET Core DI?
Its really easy to get confused between AddTransient() and AddScoped() in .NET Core dependency injection. This confusion is completely normal because, at a high level, both seem to look same but behave the differently.
-

Abstraction is a powerful concept in software design
Abstraction is a powerful concept in software design, but over-abstraction can inadvertently harm your project. Here’s a real experience from a .NET Core (C#) project. -> The Problem: Abstraction Done Too Early In one of our enterprise .NET Core applications, we aimed for “perfect architecture” and created multiple interfaces for a simple CRUD-based User module,…
-

.NET Core Tip: Boost Performance with Custom Gzip Compression Middleware
💡 .NET Core Tip: Boost Performance with Custom Gzip Compression Middleware Enhancing your application’s performance is crucial, and one effective way to do this is by compressing HTTP responses using Gzip. Custom middleware in .NET Core makes it easy to implement Gzip compression, reducing the size of your responses and speeding up data transfer. Benefits:…
-

C# Tip: The Power of the nameof Expression
🚀 C# Tip: The Power of the nameof Expression In C#, the nameof keyword is a simple yet powerful tool introduced in C# 6.0. It allows you to get the name of variables, types, methods, or members as a string, and the best part is, it works at compile time, not runtime. (csharp tip) 🔑…
-

Why You Should Always Seal Your Classes
C# Tip: Why You Should Always Seal Your Classes Here’s a CSharp, tip I often share: Seal your classes by default. In C#, classes are inheritable unless explicitly marked as sealed. When a class is sealed, it means no other class can inherit from it. This is a simple but effective way to control your…
-

Entity Framework Find and FirstOrDefault whats the difference
Entity Framework Short Tip! In Entity Framework, both Find and FirstOrDefault retrieve entities but differ in functionality: Find: 1. Looks up an entity by primary key. 2. First checks the local cache (context memory), then queries the database if not found. 3. Efficient for primary key lookups, avoiding unnecessary database calls. FirstOrDefault: 1. Retrieves the…
-

How to Effectively Block Spam in Contact Forms with .NET Core 8.0 MVC
Learn how to block spam in your contact forms using a simple hidden field technique in .NET Core 8.0 MVC. This quick, effective solution filters out unwanted submissions, ensuring you only get genuine leads without complicating the user experience.
-

Understanding the Difference Between const and readonly in Csharp
Explore the key differences between const and readonly in C#. Learn when and how to use each for optimal code performance and maintainability.