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 -
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 -
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 -
Testing ASP.NET Core Web API using Postman
Test ASP.NET Core Web API endpoints with Postman — GET, POST, PUT, and DELETE with the status codes to expect, then the power features: JWT-protected endpoints, chaining requests with variables, assertion scripts, and running the whole collection in CI with Newman.
@llaxmikant · Dec 22, 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 Application and Kestrel Web Server Settings
Configure Kestrel in ASP.NET Core — endpoints and URLs, request limits verified with real 413s, HTTPS and reverse proxies, and which settings work in appsettings.json versus code.
@llaxmikant · Nov 12, 2025 -
CRUD Operations using ASP.NET Core
Build a complete CRUD API with ASP.NET Core — verified create/read/update/delete requests, the right status codes for each, automatic validation, and the path from in-memory store to EF Core.
@llaxmikant · Oct 12, 2025 -
AJAX Calls with JsonResult in ASP.NET Core MVC — fetch and jQuery
Return JSON from ASP.NET Core MVC actions and call them from the browser — the fetch API for modern pages, jQuery $.ajax for legacy ones, POSTing JSON with FromBody, and common pitfalls.
@llaxmikant · Sep 30, 2025 -
Returning a File using FileResult in ASP.NET Core MVC
Return downloads from ASP.NET Core with FileResult — byte arrays, streams, and physical files, content types, inline vs attachment, range processing, and serving user uploads safely.
@llaxmikant · Sep 26, 2025 -
Access SQL Server from a .NET Console Application
Connect to SQL Server from a .NET 10 console app with Microsoft.Data.SqlClient: connections, parameterized commands, data readers, transactions, and where Dapper and EF Core fit.
@llaxmikant · Sep 21, 2025 -
How to Validate MVC Models using DataAnnotation Attributes
Model validation with DataAnnotations in ASP.NET Core — the attributes that matter, verified 400 problem responses, ModelState redisplay, client-side validation, and custom attributes.
@llaxmikant · Sep 10, 2025 -
Getting Started with ASP.NET Core MVC
Create your first ASP.NET Core MVC application on .NET 10 — project structure explained, Program.cs walkthrough, default routing, and your own model, controller, and view.
@llaxmikant · Aug 18, 2025