Articles tagged #ASP.NET MVC
20 article(s)
-
ASP.NET Core MVC Filters: Built-in and Custom with Examples
The five filter stages, the built-in attributes you get for free, and custom action, exception, and result filters with dependency injection — verified outputs included.
@llaxmikant · Jul 23, 2026 -
How to Use Areas in ASP.NET Core MVC
Structure a growing MVC app with areas: folder conventions, the {area:exists} route, view resolution, cross-area links, and securing an area with a policy.
@llaxmikant · Jun 11, 2026 -
Custom Validation with ValidationAttribute in ASP.NET Core MVC
Build a reusable [FutureDate] rule with ValidationAttribute, add client-side checks via IClientModelValidator, and know when IValidatableObject fits better.
@llaxmikant · May 14, 2026 -
Structured Logging in ASP.NET Core with Serilog and Seq
Wire Serilog into ASP.NET Core with console, rolling-file, and Seq sinks: request logging, enrichment, levels, and the named-placeholder habit that makes logs queryable.
@llaxmikant · Apr 26, 2026 -
Redirects in ASP.NET Core MVC: RedirectToAction, LocalRedirect and More
Choose the right redirect: RedirectToAction for app flows, 301 permanents for SEO, LocalRedirect against open redirects, and named routes with RedirectToRoute.
@llaxmikant · Apr 6, 2026 -
EF Core Migrations in a Separate Assembly
Put migrations in your data project where they belong: MigrationsAssembly, a design-time factory, the exact commands, and the classic errors this setup prevents.
@llaxmikant · Mar 29, 2026 -
How to Setup CORS Policies in ASP.NET Core Web API
Configure CORS in ASP.NET Core Web API — default and named policies, origin/method/header restrictions, preflight requests, per-endpoint policies with RequireCors, and EnableCors/DisableCors attribute
@llaxmikant · Mar 2, 2026 -
Render a Partial View with a Model in ASP.NET Core MVC
Pass models into partials from views and controllers, return PartialViewResult for AJAX fragment updates, and avoid the HtmlFieldPrefix binding trap in forms.
@llaxmikant · Feb 27, 2026 -
Using Fluent API in EF Core Code First
EF Core Fluent API configuration in OnModelCreating — tables, columns, keys, indexes, relationships, query filters, value conversions, and when to prefer it over DataAnnotations.
@llaxmikant · Feb 16, 2026 -
How to Configure Entity Relationships using Fluent API in Entity Framework Core
Configure one-to-one, one-to-many, and many-to-many relationships with the EF Core Fluent API — HasOne/WithOne, HasForeignKey, OnDelete behaviors, and EF Core 5+ skip navigations without a join entity
@llaxmikant · Feb 11, 2026 -
Read appsettings.json in a .NET Class Library with Dependency Injection
The options pattern done right: the host owns configuration sources, the library declares typed settings, and DI carries one to the other — with validation at startup.
@llaxmikant · Jan 28, 2026 -
EF Core Code First Migrations with DataAnnotations Attributes
Shape your SQL Server schema with DataAnnotations — Table, Column, Key, Required, MaxLength, Index, Timestamp, ConcurrencyCheck — and apply it with EF Core migrations, verified against a real database
@llaxmikant · Jan 27, 2026 -
Partial Views in ASP.NET Core MVC with Examples
Turn repeated Razor into reusable partial views: the partial tag helper, name resolution, passing models, and when a view component is the better tool.
@llaxmikant · Jan 20, 2026 -
Entity Framework Core Database-First Tutorial
Scaffold a DbContext and entities from an existing SQL Server database with dotnet ef dbcontext scaffold — what gets generated, re-scaffolding on schema changes, and extending via partial classes.
@llaxmikant · Jan 15, 2026 -
Compare DataTables with LINQ: Except, Intersect and Union
Diff two data snapshots with LINQ set operators: what was added, removed, changed, and unchanged — including the modern ExceptBy/IntersectBy/UnionBy variants.
@llaxmikant · Jan 1, 2026 -
Testing ASP.NET Core Web API using Postman
Test ASP.NET Core Web API endpoints with Postman — GET, POST, PUT, and DELETE requests, JSON bodies, the status codes to expect, and practical tips like collections and environment variables.
@llaxmikant · Dec 22, 2025 -
How to Bind a DropDownList in ASP.NET Core MVC
Bind selects with the select tag helper: model-bound options, enum dropdowns, required validation, and cascading dropdowns using a JSON action and fetch.
@llaxmikant · Dec 21, 2025 -
.NET Dependency Injection Object Lifetimes
Transient, scoped, and singleton lifetimes demonstrated with GUIDs — what each means, why DbContext is scoped, and the captive-dependency trap that leaks state across requests.
@llaxmikant · Dec 14, 2025 -
ASP.NET Core Autocomplete — Native datalist, fetch, and jQuery UI
Add autocomplete to ASP.NET Core pages with the native datalist element and fetch — debounced requests, capped suggestions, a custom dropdown variant, and the legacy jQuery UI hookup.
@llaxmikant · Dec 7, 2025 -
ASP.NET Core MVC Request Life Cycle Explained
Follow one request through Kestrel, middleware, routing, filters, and result execution in ASP.NET Core MVC, with a logging middleware that makes the pipeline visible.
@llaxmikant · Nov 22, 2025