Results for “ASP.NET Core”
29 result(s) in everything
-
Blog
Implement Repository Pattern with ASP.NET Core Web API
Implement the Repository Pattern with ASP.NET Core Web API on .NET 10 — EF Core 10, DTO mapping with extension methods, async CRUD operations, and the built-in OpenAPI support with Scalar.
-
Blog
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.
-
Blog
Getting Started with ASP.NET Core Web API and Entity Framework
Build your first ASP.NET Core Web API on .NET 10 with Entity Framework Core — scaffold models from SQL Server, add an async controller, and test with the built-in OpenAPI document and Scalar.
-
Blog
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.
-
Blog
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.
-
Blog
ASP.NET Core MVC Model Binding
How ASP.NET Core turns route values, query strings, forms, and JSON bodies into typed action parameters — binding sources, complex types, collections, and the classic empty-model gotcha.
-
Blog
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.
-
Blog
ASP.NET Core Controller Action Methods and Types of Action Results
Controllers, action methods, and every action result type in ASP.NET Core — View, Json, Content, status codes, redirects, and FileResult — each verified with the actual HTTP response.
-
Blog
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
-
Blog
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.
-
Blog
Return Different Types of Content from ASP.NET Core Action Results
Serve HTML, JSON, plain text, XML, files, and bare status codes from ASP.NET Core actions — with content negotiation, verified response headers, and guidance on choosing.
-
Blog
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.
-
Blog
ASP.NET Core MVC Routing Explained with Examples
Conventional and attribute routing in ASP.NET Core — the default pattern, API route templates, parameters and constraints, catch-alls, and generating URLs instead of hard-coding them.
-
Blog
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.
-
Blog
AutoMapper in ASP.NET Core Web API — and the Modern Alternatives
AutoMapper usage in ASP.NET Core Web API, its 2025 commercial licensing change, and the modern alternatives — hand-written mapping extension methods and the Mapperly source generator.
-
Blog
Autocomplete in ASP.NET Core — 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.
-
Blog
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.
-
Blog
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.
-
Blog
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.
-
Blog
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.
-
Blog
How to Implement Dependency Injection in .NET Core
Learn dependency injection in .NET with the built-in IoC container — register services in Program.cs, inject them through constructors, choose lifetimes, and swap implementations with one line.
-
Blog
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
-
Blog
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.
-
Blog
.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.
-
Blog
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.
-
Blog
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.
-
Blog
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.
-
Blog
How to Export SQL Server Data to Excel in C# (Without Office Interop)
Export SQL Server query results to Excel with ClosedXML — no Office installation, no COM Interop, safe on servers and containers, with styling and a Web API download endpoint.
-
Blog
Cascading Dropdowns with JsonResult in ASP.NET Core
Build cascading dropdowns in ASP.NET Core — a JsonResult action per level, the fetch API on the change event, safe option rendering, and a jQuery version for older projects.