<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shreyans Padmani</title>
    <description>The latest articles on DEV Community by Shreyans Padmani (@shreyans_padmani).</description>
    <link>https://dev.to/shreyans_padmani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2894250%2Ffca54370-5499-4542-b41e-e03e35c520f6.jpg</url>
      <title>DEV Community: Shreyans Padmani</title>
      <link>https://dev.to/shreyans_padmani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shreyans_padmani"/>
    <language>en</language>
    <item>
      <title>Different Between of MVC controller and APIController</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 11:21:42 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/different-between-of-mvc-controller-and-apicontroller-36cm</link>
      <guid>https://dev.to/shreyans_padmani/different-between-of-mvc-controller-and-apicontroller-36cm</guid>
      <description>&lt;p&gt;In ASP.NET Core, both MVC Controllers and API Controllers handle HTTP requests, but they serve different purposes and are used in different application architectures. (Link — &lt;a href="https://shreyans.tech/computer-vision-development-freelancer" rel="noopener noreferrer"&gt;https://shreyans.tech/computer-vision-development-freelancer&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4um44hw2cvxbne5xjcw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4um44hw2cvxbne5xjcw.jpg" alt=" " width="800" height="652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MVC Controller(ASP.Net MVC)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1️⃣ Handles HTTP Requests&lt;br&gt;
Receives incoming browser requests and decides how to respond.&lt;/p&gt;

&lt;p&gt;2️⃣ Returns Views (HTML)&lt;br&gt;
Primarily used to return Razor Views (.cshtml) to render UI pages.&lt;/p&gt;

&lt;p&gt;3️⃣ Inherits from Controller Class&lt;br&gt;
Provides built-in support for views, model binding, TempData, and ViewBag.&lt;/p&gt;

&lt;p&gt;4️⃣ Part of MVC Pattern&lt;br&gt;
Acts as the middle layer between Model (data/business logic) and View (UI).&lt;/p&gt;

&lt;p&gt;5️⃣ Supports Action Methods&lt;br&gt;
Public methods inside the controller are called action methods and respond to routes.&lt;/p&gt;

&lt;p&gt;6️⃣ Model Binding Support&lt;br&gt;
Automatically binds form data, query strings, and route values to model objects.&lt;/p&gt;

&lt;p&gt;7️⃣ ViewData, ViewBag &amp;amp; TempData&lt;br&gt;
Used to pass data from Controller to View.&lt;/p&gt;

&lt;p&gt;8️⃣ Supports Filters&lt;br&gt;
Allows use of Action Filters, Authorization Filters, and Exception Filters.&lt;/p&gt;

&lt;p&gt;9️⃣ Routing Integration&lt;br&gt;
Works with ASP.NET routing to map URLs to specific controller actions.&lt;/p&gt;

&lt;p&gt;🔟 Best for Server-Rendered Applications&lt;br&gt;
Ideal for traditional web applications where the server generates HTML pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tixmjzn6weyhj5ehiqn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tixmjzn6weyhj5ehiqn.jpg" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;API Controller(ASP.Net Web API)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1️⃣ Designed for RESTful APIs&lt;br&gt;
Handles HTTP requests and returns data (JSON, XML) instead of HTML views.&lt;/p&gt;

&lt;p&gt;2️⃣ Inherits from ControllerBase&lt;br&gt;
Lightweight base class optimized for API scenarios without view support.&lt;/p&gt;

&lt;p&gt;3️⃣ Uses [ApiController] Attribute&lt;br&gt;
Enables automatic model validation, binding, and better API conventions.&lt;/p&gt;

&lt;p&gt;4️⃣ Returns Action Results or Data Objects&lt;br&gt;
Common return types include IActionResult, ActionResult, or raw objects serialized to JSON/XML.&lt;/p&gt;

&lt;p&gt;5️⃣ Supports Routing via Attributes&lt;br&gt;
Uses [Route("api/[controller]")] and [HttpGet], [HttpPost] for endpoint mapping.&lt;/p&gt;

&lt;p&gt;6️⃣ Automatic Model Binding &amp;amp; Validation&lt;br&gt;
Request bodies are automatically bound to models, and invalid models trigger HTTP 400 responses.&lt;/p&gt;

&lt;p&gt;7️⃣ Supports HTTP Methods Explicitly&lt;br&gt;
Action methods can handle GET, POST, PUT, DELETE, PATCH using attributes.&lt;/p&gt;

&lt;p&gt;8️⃣ Ideal for Frontend &amp;amp; Mobile Integration&lt;br&gt;
APIs are consumed by Angular, React, mobile apps, or other services.&lt;/p&gt;

&lt;p&gt;9️⃣ Stateless by Nature&lt;br&gt;
API Controllers generally do not maintain session or state, following REST principles.&lt;/p&gt;

&lt;p&gt;🔟 Supports Filters &amp;amp; Middleware&lt;br&gt;
Can use authentication, authorization, exception handling, and logging filters for API behavior.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7oofx4ad7l45tm51wgk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7oofx4ad7l45tm51wgk.jpg" alt=" " width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In ASP.NET, MVC Controllers and API Controllers serve different purposes. MVC Controllers are designed to render UI views for traditional web applications, while API Controllers are optimized for data-centric RESTful APIs, returning JSON or XML.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Official Website — &lt;a href="https://shreyans.tech/" rel="noopener noreferrer"&gt;shreyans.tech&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aspnetcoremvc</category>
      <category>mvc</category>
      <category>restapi</category>
      <category>apicontroller</category>
    </item>
    <item>
      <title>How to build Multi-Tenant app with EF Core</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 11:14:00 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/how-to-build-multi-tenant-app-with-ef-core-2dh8</link>
      <guid>https://dev.to/shreyans_padmani/how-to-build-multi-tenant-app-with-ef-core-2dh8</guid>
      <description>&lt;p&gt;Build a multi-tenant app with EF Core by adding TenantId to entities, applying global query filters, resolving tenant per request, isolating data via shared or separate databases, and enforcing secure dependency injection configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fica4jcv8u02e0u3yrhtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fica4jcv8u02e0u3yrhtf.png" alt=" " width="800" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;EF Query Filters&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Global Filtering&lt;/strong&gt;&lt;br&gt;
Automatically apply conditions to all queries for an entity (e.g., soft delete, multi-tenancy).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Defined in OnModelCreating&lt;/strong&gt;&lt;br&gt;
Configured using HasQueryFilter() inside the DbContext model builder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Soft Delete Support&lt;/strong&gt;&lt;br&gt;
Commonly used to filter out records where IsDeleted = true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-Tenant Isolation&lt;/strong&gt;&lt;br&gt;
Filters data by TenantId to ensure users access only their tenant’s data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatically Applied&lt;/strong&gt;&lt;br&gt;
No need to manually add Where clauses in every query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Be Disabled Temporarily&lt;/strong&gt;&lt;br&gt;
Use IgnoreQueryFilters() when you need to bypass global filters.&lt;/p&gt;

&lt;p&gt;**Supports Parameters&lt;br&gt;
**Filters can use context-level variables (e.g., current tenant or user ID).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improves Security &amp;amp; Consistency&lt;/strong&gt;&lt;br&gt;
Reduces risk of accidental data exposure and keeps filtering logic centralized.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh1sens7ik4ouw58qo1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhh1sens7ik4ouw58qo1u.png" alt=" " width="800" height="608"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;EF + Dynamic Connection String Resolution&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tenant-Based Database Selection&lt;/strong&gt;&lt;br&gt;
Dynamically choose a connection string based on the current tenant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supports Multi-Tenant Architecture&lt;/strong&gt;&lt;br&gt;
Enables separate databases per tenant for stronger data isolation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resolve Per Request&lt;/strong&gt;&lt;br&gt;
Determine the connection string from request data (subdomain, header, JWT claim).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use DbContextOptionsBuilder&lt;/strong&gt;&lt;br&gt;
Configure the connection string inside OnConfiguring() or during service registration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency Injection Friendly&lt;/strong&gt;&lt;br&gt;
Inject a TenantProvider or ConnectionStringResolver service into DbContext.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improves Security &amp;amp; Scalability&lt;/strong&gt;&lt;br&gt;
Isolates tenant data and allows independent scaling or migration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Works with Multiple Providers&lt;/strong&gt;&lt;br&gt;
Can dynamically switch between SQL Server, PostgreSQL, etc., if required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supports Central Configuration Store&lt;/strong&gt;&lt;br&gt;
Store tenant connection strings in a master database or configuration service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requires Careful Lifetime Management&lt;/strong&gt;&lt;br&gt;
DbContext should be scoped per request to avoid cross-tenant leakage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Useful for SaaS Applications&lt;/strong&gt;&lt;br&gt;
Ideal for enterprise SaaS platforms needing strict data separation.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ngq8bao1w7qpom6m7gz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ngq8bao1w7qpom6m7gz.png" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Dynamic connection string resolution in EF Core is a powerful approach for building scalable and secure multi-tenant applications. By resolving the database connection per request, you can ensure proper tenant isolation, improve data security, and enable flexible scaling strategies. When combined with dependency injection and proper DbContext scoping, it becomes a clean and maintainable solution for modern SaaS architectures.&lt;/p&gt;

&lt;p&gt;In short, EF Core with dynamic connection string resolution enables true database-level multi-tenancy with flexibility and control.&lt;/p&gt;

</description>
      <category>efcore</category>
      <category>aspnet</category>
      <category>backenddevelopment</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>Why We Use LangChain? — To Smoothly Connect with LLMs</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 11:05:07 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/why-we-use-langchain-to-smoothly-connect-with-llms-1m2n</link>
      <guid>https://dev.to/shreyans_padmani/why-we-use-langchain-to-smoothly-connect-with-llms-1m2n</guid>
      <description>&lt;p&gt;In today’s AI-driven world, Large Language Models (LLMs) like OpenAI’s GPT models, Google’s Gemini, and Anthropic’s Claude are powerful tools. However, using them effectively in real-world applications requires more than just sending prompts and receiving responses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw49hdkzicfimzl1cci29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw49hdkzicfimzl1cci29.png" alt=" " width="800" height="657"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is LangChain ?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;LangChain is an open-source Python framework for building application powered by Large Language Models (LLM)&lt;/p&gt;

&lt;p&gt;Makes LLM context-aware by integrating external data and tools&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commonly Used for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chatbots&lt;/li&gt;
&lt;li&gt;Question Answering&lt;/li&gt;
&lt;li&gt;Document Analysis&lt;/li&gt;
&lt;li&gt;RAG (Retrieval-Augmented Generation)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why LangChain ?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Out-of-the-box LLM support (OpenAI, Hugging Face, Anthropic, etc.)&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;Vector databases (Pinecone, FAISS, Chroma)&lt;/li&gt;
&lt;li&gt;Document loaders (PDF, CSV, web scraping)&lt;/li&gt;
&lt;li&gt;Supports prompt templates, chains, and agents&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How LangChain Works with LLMs&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;LangChain helps LLMs understand context, remember past interactions, and connect multiple steps to handle complex tasks easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt Templates&lt;/strong&gt;: Define reusable structures for questions or instructions, ensuring consistent and clear communication with the LLM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chains&lt;/strong&gt;: Connect multiple steps or model calls to perform complex reasoning or multi-stage tasks automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory&lt;/strong&gt;: Allows the model to remember previous inputs and responses, giving conversations a continuous and contextual flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agents&lt;/strong&gt;: Enable the model to decide which action or tool to use next, such as searching data or calling an API.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In a world where Large Language Models (LLMs) are becoming central to modern applications, simply calling an API is no longer enough. We need structure, memory, workflows, and seamless integration with external tools and data sources. LangChain provides that missing layer.&lt;/p&gt;

&lt;p&gt;By enabling prompt management, memory handling, Retrieval-Augmented Generation (RAG), and tool integration, LangChain transforms raw LLM capabilities into scalable, production-ready AI systems. Whether you’re building chatbots, AI agents, or data-driven assistants, LangChain helps bridge the gap between powerful models and practical real-world solutions.&lt;/p&gt;

&lt;p&gt;In short, we use LangChain to smoothly connect with LLMs — and to turn intelligence into impact.&lt;/p&gt;

</description>
      <category>langchain</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>architecture</category>
    </item>
    <item>
      <title>.NET + AI = The Perfect Combo</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:59:44 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/net-ai-the-perfect-combo-46gp</link>
      <guid>https://dev.to/shreyans_padmani/net-ai-the-perfect-combo-46gp</guid>
      <description>&lt;p&gt;The combination of .NET and Artificial Intelligence creates a powerful foundation for building smart, scalable, and enterprise-ready applications. With the robust ecosystem of ASP.NET Core, developers can seamlessly integrate AI capabilities into web apps, APIs, and cloud solutions.&lt;/p&gt;

&lt;p&gt;Using libraries like ML.NET, .NET developers can build, train, and deploy machine learning models directly within their applications — without switching platforms. Integration with cloud platforms such as Microsoft Azure AI further enhances scalability, security, and performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6ewxk19a5nx894eh2so.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6ewxk19a5nx894eh2so.png" alt=" " width="800" height="704"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Choose .NET for AI Development&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cross-Platform &amp;amp; Cloud Friendly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build once, deploy anywhere: Windows, Linux, Docker, Azure, AWS. Perfect for scalable AI solutions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance &amp;amp; Reliability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;.NET is fast and optimized. AI workloads combined with .NET APIs ensure great production performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source &amp;amp; Community Support&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Huge community, NuGet packages, GitHub Models — rich ecosystem for learning and implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secure &amp;amp; Enterprise Ready&lt;/strong&gt;&lt;br&gt;
.NET supports Identity, Dependency Injection, Logging, and Configuration — everything enterprises need for secure AI applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What are GitHub Models&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;GitHub provides pre-hosted AI models that you can use without setting up any GPU or server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ready-to-use models (GPT, Phi, LLaMA, etc.)&lt;/li&gt;
&lt;li&gt;Runs via API — no infra setup&lt;/li&gt;
&lt;li&gt;Great for prototyping AI apps&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Microsoft.Extensions.AI&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A new .NET library that helps developers easily plug AI models (like GitHub Models/OpenAI) directly into their applications with minimal code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helps integrate AI like a simple .NET service.&lt;/li&gt;
&lt;li&gt;Works with GitHub Models, Azure OpenAI, etc.&lt;/li&gt;
&lt;li&gt;Removes complexity of writing APIs manually&lt;/li&gt;
&lt;li&gt;You can register AI models in Program.cs using AddAIClient, just like any other .NET service — making it clean and maintainable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The fusion of .NET and AI empowers developers to build intelligent, scalable, and future-ready applications. By combining the stability of .NET with advanced AI capabilities, businesses can innovate faster, automate smarter, and deliver enhanced user experiences with confidence.&lt;/p&gt;

</description>
      <category>dotnetcore</category>
      <category>ai</category>
      <category>azure</category>
    </item>
    <item>
      <title>What is Agentic AI ?</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:54:38 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/what-is-agentic-ai--3lnk</link>
      <guid>https://dev.to/shreyans_padmani/what-is-agentic-ai--3lnk</guid>
      <description>&lt;p&gt;Agentic AI refers to artificial intelligence systems that can act autonomously to achieve goals. Unlike traditional AI that simply responds to prompts, agentic AI can plan, make decisions, take actions, learn from feedback, and adapt to changing environments with minimal human intervention.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhflbkyrhl82ixnk2qh8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhflbkyrhl82ixnk2qh8.png" alt=" " width="800" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Agentic AI?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Agentic AI is the next evolution of artificial intelligence — where AI doesn’t just respond but actually acts.&lt;/p&gt;

&lt;p&gt;It’s designed to think, decide, and execute tasks on its own, just like a digital assistant that understands goals and takes initiative to achieve them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agentic AI can:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plan actions to reach an objective,&lt;/li&gt;
&lt;li&gt;Use tools and APIs to perform real-world tasks,&lt;/li&gt;
&lt;li&gt;Adapt using memory and feedback, and&lt;/li&gt;
&lt;li&gt;Work continuously without constant human input.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Agentic AI Works&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Agentic AI works like a smart digital brain that can understand goals, plan actions, and execute them — all on its own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Understanding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI interprets user goals or queries and identifies what needs to be achieved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI interprets user goals or queries and identifies what needs to be achieved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Action Execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The AI performs real-world tasks by interacting with tools, APIs, or systems automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output Generation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Continuously improves its reasoning and performance through feedback and experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Agentic AI represents a powerful shift in artificial intelligence, moving from reactive systems to goal-driven, autonomous agents. By combining reasoning, planning, and adaptability, it enables smarter automation and more efficient problem-solving across industries.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>agentic</category>
      <category>aiops</category>
    </item>
    <item>
      <title>ApiController in .NET</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:48:01 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/apicontroller-in-net-22no</link>
      <guid>https://dev.to/shreyans_padmani/apicontroller-in-net-22no</guid>
      <description>&lt;p&gt;ApiController in ASP.NET Core is an attribute used for building RESTful web APIs. It enables automatic model validation, parameter binding, and standardized error responses, simplifying controller logic and improving API consistency, reliability, and developer productivity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen0dgl97py9sm2mem4tv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen0dgl97py9sm2mem4tv.png" alt=" " width="800" height="656"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;ApiController Attribute&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The [ApiController] attribute in ASP.NET Core is used to indicate that a controller is intended to serve as an API endpoint.&lt;/p&gt;

&lt;p&gt;It simplifies the development of RESTful APIs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attribute routing requirement&lt;/li&gt;
&lt;li&gt;Automatic HTTP 400 responses&lt;/li&gt;
&lt;li&gt;Binding source parameter inference&lt;/li&gt;
&lt;li&gt;Problem details for error status codes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2sojls15de40zu01xhdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2sojls15de40zu01xhdy.png" alt=" " width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fst1lnchr5gilkjxc88o6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fst1lnchr5gilkjxc88o6.png" alt=" " width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Features of [ApiController]&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1 . Attribute Routing Requirement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Applying the [ApiController] attribute enforces attribute routing. This means that actions within the controller will not be accessible via conventional routing methods (like UseEndpoints or UseMvcWithDefaultRoute). You must use the [Route] attribute on the controller or action methods.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farid1foms98qm2p9d0fh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Farid1foms98qm2p9d0fh.png" alt=" " width="800" height="184"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2 .Default Bad Request Response (Problem Details)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The default response type for an HTTP 400 response is ValidationProblemDetails, which conforms to the RFC 7231 standard for problem details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymubeivs493v6fo31y1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fymubeivs493v6fo31y1w.png" alt=" " width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3 . Automatic HTTP 400 Responses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When model validation fails, the [ApiController] attribute automatically handles the response, returning an HTTP 400 Bad Request status.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1jg27tnt9sj61ks7m4v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1jg27tnt9sj61ks7m4v.png" alt=" " width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 . Binding Source Parameter Inference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The [ApiController] attribute automatically determines the source of certain action parameters, meaning you often don’t need to explicitly use binding attributes like [FromBody] or [FromQuery].&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qkeht6rcxuv1y92u0je.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qkeht6rcxuv1y92u0je.png" alt=" " width="511" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In conclusion, ApiController in ASP.NET Core streamlines API development by providing automatic validation, binding, and error handling. It reduces boilerplate code, enforces best practices, and enhances consistency, making it essential for building robust and maintainable web APIs.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>backenddevelopment</category>
      <category>restapi</category>
      <category>apicontroller</category>
    </item>
    <item>
      <title>Middleware Deep Drive in .NET</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:25:55 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/middleware-deep-drive-in-net-6o7</link>
      <guid>https://dev.to/shreyans_padmani/middleware-deep-drive-in-net-6o7</guid>
      <description>&lt;p&gt;Middleware in .NET acts as a request pipeline component that handles logging, authentication, routing, and error handling. Each middleware processes HTTP requests and responses sequentially, enabling modular, reusable, and scalable application architecture within ASP.NET Core applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgi2jtht8680m35fw5nb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgi2jtht8680m35fw5nb.png" alt=" " width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Code Snippet : app.Use(…)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Middleware is the backbone of ASP.NET Core request pipeline.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Executes in pipeline order&lt;/li&gt;
&lt;li&gt;Can block, modify, or continue the request&lt;/li&gt;
&lt;li&gt;Handles cross-cutting concerns like Logging, Auth, Exception Handling&lt;/li&gt;
&lt;li&gt;Inline middleware is the simplest way to inject logic directly in Program.cs.&lt;/li&gt;
&lt;li&gt;Use inline middleware for quick checks, lightweight logging, or debugging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpcci56ahg3n500p3ce6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpcci56ahg3n500p3ce6.png" alt=" " width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Middleware Order Matter&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sequential Request Flow: Middleware executes in the order added; order matters for dependencies.&lt;/li&gt;
&lt;li&gt;Reverse Response Flow: Response passes through middleware in reverse order; placement affects response modification.&lt;/li&gt;
&lt;li&gt;Short-Circuiting: Middleware like UseAuthentication can stop later middleware from running.&lt;/li&gt;
&lt;li&gt;Security &amp;amp; Error Handling: UseExceptionHandler should be first; authentication must run before authorization.&lt;/li&gt;
&lt;li&gt;Order impact middleware behavior. Authentication must be before Authorization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3nx8zuotr8jui4fz2t5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3nx8zuotr8jui4fz2t5.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Creating Custom Middleware&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;RequestDelegate Dependency: Middleware receives a RequestDelegate to invoke the next component.&lt;/li&gt;
&lt;li&gt;InvokeAsync Method: Core logic resides in InvokeAsync(HttpContext context).&lt;/li&gt;
&lt;li&gt;Short-Circuiting: Middleware can stop the pipeline by not calling await _next(context).&lt;/li&gt;
&lt;li&gt;Passing Control: Call await _next(context) to continue to the next middleware.&lt;/li&gt;
&lt;li&gt;Registration: Use app.UseMiddleware() to add it to the pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyinu7s2a229q9ek6s174.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyinu7s2a229q9ek6s174.png" alt=" " width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Can Middleware Actually Do?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Logging and diagnostics&lt;/strong&gt;: Middleware can run at the beginning of the pipeline to log request details (timing, path, user) and at the end to log response details (status code, duration).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blocking suspicious IPs&lt;/strong&gt;: It can inspect the source IP address of a request and immediately short-circuit the pipeline, preventing malicious or unwanted traffic from reaching the core application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Injecting headers (e.g., CORS)&lt;/strong&gt;: Middleware is used to modify the HTTP response by adding or changing headers, such as setting CORS (Cross-Origin Resource Sharing) headers to allow external domains to access resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication/Authorization&lt;/strong&gt;:Authentication identifies the user (e.g., reads a token or cookie).Authorization checks if the identified user has permission to access the requested resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Request throttling&lt;/strong&gt;: This involves limiting the number of requests a client can make over a certain period to prevent abuse or overload, often implemented by inspecting rate limits before passing the request further.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error Handling&lt;/strong&gt;: Early-registered middleware can catch exceptions thrown by all subsequent components and generate a formatted, user-friendly error response.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Middleware is the backbone of ASP.NET Core’s request pipeline, enabling clean architecture, flexibility, and scalability. By structuring components efficiently, developers can build secure, maintainable, and high-performance .NET applications tailored for modern, AI-integrated systems.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>aspnet</category>
      <category>softwaredevelopment</category>
      <category>dotnetcore</category>
    </item>
    <item>
      <title>BigQuery vs Traditional Database</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:20:18 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/bigquery-vs-traditional-database-2791</link>
      <guid>https://dev.to/shreyans_padmani/bigquery-vs-traditional-database-2791</guid>
      <description>&lt;p&gt;Google BigQuery is a serverless, scalable data warehouse built for analytics on massive datasets, while traditional databases like MySQL handle structured transactions efficiently. BigQuery excels in big data processing; traditional databases suit operational, real-time applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yn4xlc4t9gz87ozz72s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yn4xlc4t9gz87ozz72s.png" alt=" " width="800" height="687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Difference Between BigQuery and Traditional Databases&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xdvq08xasiqqags2n2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xdvq08xasiqqags2n2t.png" alt=" " width="800" height="702"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is BigQuery&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;BigQuery is a serverless cloud data warehouse by Google, designed for fast analytics and big data processing, capable of analyzing terabytes to petabytes of data in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 . Serverless &amp;amp; Fully Managed&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to manage servers or infrastructure.&lt;/li&gt;
&lt;li&gt;Google automatically takes care of scaling, performance, and maintenance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2 . Massive Scalability&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to manage servers or infrastructure.&lt;/li&gt;
&lt;li&gt;Google automatically takes care of scaling, performance, and maintenance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3 . Blazing-Fast SQL Queries&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports simple SQL syntax but runs queries super fast.&lt;/li&gt;
&lt;li&gt;Uses a distributed system to process data in parallel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4 . Cost-Effective (Pay-as-You-Go)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pay only for the data you store and the queries you run.&lt;/li&gt;
&lt;li&gt;No server setup cost or maintenance fees.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5 . Real-Time Analytics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyze live data streams in near real-time.&lt;/li&gt;
&lt;li&gt;Great for dashboards, monitoring, and instant insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Traditional Databases&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Traditional databases like MySQL, PostgreSQL, and Oracle are RDBMS designed for OLTP, handling day-to-day transactions and CRUD operations efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 . Structured Data Storage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores data in tables with rows and columns using a fixed schema.&lt;/li&gt;
&lt;li&gt;Best for organized and relational data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2 . Self-Managed Infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires setting up and managing servers, backups, and scaling manually.&lt;/li&gt;
&lt;li&gt;Needs regular maintenance and performance tuning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3 . Optimized for Transactions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Great for CRUD operations (Create, Read, Update, Delete).&lt;/li&gt;
&lt;li&gt;Handles real-time transactions like orders, payments, and logins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4 . Limited Scalability&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works well with small to medium-sized data.&lt;/li&gt;
&lt;li&gt;Scaling large data often requires more hardware and complex setups.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5 . Application-Focused Use Cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Commonly used for web apps, user management, financial systems, and business operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Google BigQuery is a powerful, scalable, and serverless data warehouse designed for large-scale analytics. It simplifies big data processing, reduces infrastructure management, and delivers fast insights, making it ideal for modern business intelligence and data-driven decision making.&lt;/p&gt;

</description>
      <category>bigquery</category>
      <category>googlecloud</category>
      <category>datawarehouse</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Stop using try-catch in every controller in C#</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:13:10 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/stop-using-try-catch-in-every-controller-in-c-5bek</link>
      <guid>https://dev.to/shreyans_padmani/stop-using-try-catch-in-every-controller-in-c-5bek</guid>
      <description>&lt;p&gt;Stop using try-catch in every controller. Instead, use global exception handling and middleware to manage errors centrally. This keeps controllers clean, improves maintainability, ensures consistent responses, and follows best practices in modern web application architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6evnvd33g1nextxhpzst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6evnvd33g1nextxhpzst.png" alt=" " width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Problem: Try-Catch in Every Controller&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every controller duplicates the same try-catch block.&lt;/li&gt;
&lt;li&gt;Controllers mix business logic, error handling, and logging.&lt;/li&gt;
&lt;li&gt;Any change to error handling requires editing multiple controllers.&lt;/li&gt;
&lt;li&gt;Different developers return different error formats or status codes.&lt;/li&gt;
&lt;li&gt;You can’t isolate logic easily due to embedded exception handling.&lt;/li&gt;
&lt;li&gt;Adding new exception types means rewriting every controller again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyjcdk0a9idoz8ce75k5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyjcdk0a9idoz8ce75k5d.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Solution : Middleware Code(ExceptionMiddleware)&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;This middleware catches all unhandled exceptions in the request pipeline, so you don’t need to use try-catch in every controller.&lt;/li&gt;
&lt;li&gt;It logs the error using ILogger, making debugging and monitoring easier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feh75na34idntvlton23r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feh75na34idntvlton23r.png" alt=" " width="800" height="602"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Register the Middleware&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Registers the custom middleware in the request pipeline so it runs on every request.&lt;/li&gt;
&lt;li&gt;Ensures global exception handling by catching unhandled errors before they reach the response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kldxibfjun06a5h1die.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kldxibfjun06a5h1die.png" alt=" " width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Benifits&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You don’t need to write try-catch in every controller.&lt;/li&gt;
&lt;li&gt;All errors are handled in one place, making the code clean and simple.&lt;/li&gt;
&lt;li&gt;It gives the same type of error response every time.&lt;/li&gt;
&lt;li&gt;Easy to find and fix problems because all exceptions are logged.&lt;/li&gt;
&lt;li&gt;Makes the application more secure by not showing detailed error messages to users.&lt;/li&gt;
&lt;li&gt;Improves maintenance since error handling logic is centralized.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In conclusion, avoid placing try-catch blocks in every controller. Use centralized exception handling to keep code clean, consistent, and maintainable while ensuring better error management and improved application architecture.&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>dotnet</category>
      <category>middleware</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>How Azure Works with .NET</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 10:01:16 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/how-azure-works-with-net-52fd</link>
      <guid>https://dev.to/shreyans_padmani/how-azure-works-with-net-52fd</guid>
      <description>&lt;p&gt;Microsoft Azure works seamlessly with .NET by providing cloud services to build, deploy, and scale applications. Developers can host .NET apps using Microsoft Azure services like App Service, Azure SQL, and Azure Functions for secure, scalable, and high-performance solutions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2izwu6qrdg63j0qcvw1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2izwu6qrdg63j0qcvw1l.png" alt=" " width="800" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why We Use Azure with .NET&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When building .NET software, we need hosting, storage, security, and scalability. Azure, Microsoft’s cloud platform, provides all these seamlessly, making .NET apps easier to run and manage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Perfect Integration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure is made by Microsoft, just like .NET, so they work perfectly together.&lt;/li&gt;
&lt;li&gt;You get ready-to-use tools, templates, and SDKs that save time in development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Easy Deployment &amp;amp; Hosting&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can deploy .NET apps directly to Azure without complicated setup.&lt;/li&gt;
&lt;li&gt;Azure automatically handles servers, scaling, and updates, so your app runs smoothly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Built-in Security and Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure provides security features like authentication, encryption, and role management.&lt;/li&gt;
&lt;li&gt;You can monitor, manage, and troubleshoot your .NET apps easily from the Azure portal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scalability and Performance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure can automatically scale your .NET apps to handle more users anytime.&lt;/li&gt;
&lt;li&gt;You only pay for what you use, making it cost-efficient for growing apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Azure Services for .NET Developers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hosting and Computing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run your .NET apps on Azure’s cloud servers without managing physical hardware.&lt;/li&gt;
&lt;li&gt;Use services like Azure App Service to deploy and scale apps automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Database and Storage&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store your app data securely using Azure SQL Database or Blob Storage.&lt;/li&gt;
&lt;li&gt;Easily manage backups and large datasets without worrying about server maintenance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security and Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protect your .NET apps with built-in Azure security and identity services.&lt;/li&gt;
&lt;li&gt;Manage user access, encryption, and secure connections effortlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Performance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track your app’s health and performance with Azure Monitor and Application Insights.&lt;/li&gt;
&lt;li&gt;Detect issues early and optimize your .NET app for faster, smoother operation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In conclusion, .NET integrates smoothly with Microsoft Azure, enabling developers to build, deploy, and scale secure and high-performance applications in the cloud. This combination provides flexibility, reliability, and powerful tools for modern application development.&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>dotnet</category>
      <category>azurefunctions</category>
      <category>devops</category>
    </item>
    <item>
      <title>Self-Hosted Runner in Git-Hub Action</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Mar 2026 09:44:59 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/self-hosted-runner-in-git-hub-action-5af3</link>
      <guid>https://dev.to/shreyans_padmani/self-hosted-runner-in-git-hub-action-5af3</guid>
      <description>&lt;p&gt;A Self-Hosted Runner in GitHub Actions is a machine that you manage and maintain to run your CI/CD workflows, instead of using GitHub’s hosted runners.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0l2pf4knq11f9h1a5zr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0l2pf4knq11f9h1a5zr.png" alt=" " width="800" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Are Self-Hosted Runners&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A self-hosted runner is your own machine configured to run GitHub Actions workflows.&lt;/li&gt;
&lt;li&gt;Runs CI/CD workflows on your own server or VM, giving full control over performance, tools, and build environment.&lt;/li&gt;
&lt;li&gt;Fully customizable environment with any OS, software, dependencies, or scripts pre-installed to meet specific workflow requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of Runners in GitHub&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;GitHub-Hosted Runners — Pre-configured, auto-scaled, ready-to-use servers provided by GitHub.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: Ubuntu, Windows, macOS virtual environments.&lt;/li&gt;
&lt;li&gt;Use case: Quick CI/CD setup, no maintenance needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-Hosted Runners&lt;/strong&gt; — Your own machine that executes jobs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: On-prem server, cloud VM (like AWS EC2, Azure VM), or even a Raspberry Pi.&lt;/li&gt;
&lt;li&gt;Use case: Full control, custom tools, access to private networks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Self-Hosted Work in GitHub Actions&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Runner Registration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You register your machine with a GitHub repository or organization.&lt;/li&gt;
&lt;li&gt;GitHub provides a token and instructions to install the runner software.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Runner Setup&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the runner software on your machine (Windows, Linux, or macOS).&lt;/li&gt;
&lt;li&gt;The runner connects to GitHub and waits for jobs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Workflow Trigger&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When a GitHub Action workflow runs (like on push or pull_request), GitHub checks the runs-on field.&lt;/li&gt;
&lt;li&gt;GitHub checks the workflow’s runs-on field. If it says self-hosted, it sends the job to your machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Job Execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The runner downloads the workflow files, runs the jobs locally, and sends logs/results back to GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result Reporting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub shows build results (success/failure) in the Actions tab — just like with a GitHub-hosted runner.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Alternatives to Self-Hosted Runners&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub-Hosted Runners (Default Option)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fully managed by GitHub&lt;/li&gt;
&lt;li&gt;No setup, auto-scaled, but limited in customization&lt;/li&gt;
&lt;li&gt;Good for small to medium workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Third-Party CI/CD Tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tools like Jenkins, GitLab CI, or CircleCI can integrate with GitHub and run pipelines on your own servers or cloud.&lt;/li&gt;
&lt;li&gt;Gives similar control but outside GitHub Actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-Managed Cloud Infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Kubernetes, Docker Swarm, or custom CI runners to build a scalable CI/CD system.&lt;/li&gt;
&lt;li&gt;More complex but highly flexible for enterprise needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A Self-Hosted Runner in GitHub Actions gives organizations complete control over their CI/CD execution environment. Unlike GitHub-hosted runners, self-hosted runners allow you to customize hardware, install specific tools, access private networks, and optimize performance based on project needs.&lt;/p&gt;

</description>
      <category>githubactions</category>
      <category>selfhostedrunner</category>
      <category>cicd</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Stop Using AllowAnyOrigin()</title>
      <dc:creator>Shreyans Padmani</dc:creator>
      <pubDate>Sun, 08 Feb 2026 08:11:10 +0000</pubDate>
      <link>https://dev.to/shreyans_padmani/stop-using-allowanyorigin-3dpn</link>
      <guid>https://dev.to/shreyans_padmani/stop-using-allowanyorigin-3dpn</guid>
      <description>&lt;p&gt;AllowAnyOrigin() might look like a quick fix for CORS errors, but it silently opens the door to serious security risks.&lt;br&gt;
Many developers use it without understanding how it exposes APIs to unwanted access.&lt;br&gt;
In real-world applications, this single line can compromise data, authentication, and user trust.&lt;br&gt;
Let’s understand why AllowAnyOrigin() is dangerous and what you should use instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ns0p1gug23lanyv8hai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ns0p1gug23lanyv8hai.png" alt=" " width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Common Mistake – Using AllowAnyOrigin()&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AllowAnyOrigin() allows any website to access your API, including malicious domains.&lt;/li&gt;
&lt;li&gt;It exposes sensitive endpoints that were meant to be used only by your own frontend.&lt;/li&gt;
&lt;li&gt;When combined with cookies or authentication headers, it increases the risk of CSRF attacks.&lt;/li&gt;
&lt;li&gt;Developers often add it to fix CORS errors quickly and forget to remove it before production.&lt;/li&gt;
&lt;li&gt;It breaks the principle of least privilege, allowing more access than necessary.&lt;/li&gt;
&lt;li&gt;A single misconfiguration can lead to data leakage, abuse of APIs, and security breaches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs49hiq5h0x8ntnwq7pnf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs49hiq5h0x8ntnwq7pnf.png" alt=" " width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Safe Environment - Based Setup&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Development Configuration (DevConfig)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow limited local origins like localhost only for faster development and testing.&lt;/li&gt;
&lt;li&gt;Use relaxed CORS rules without exposing real production data.&lt;/li&gt;
&lt;li&gt;Keep environment variables separate to avoid accidental production access.&lt;/li&gt;
&lt;li&gt;Clearly mark this configuration as development-only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjespu990mf5t3wyl4ns1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjespu990mf5t3wyl4ns1.png" alt=" " width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Production Configuration (ProdConfig)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow only trusted domains (e.g., your official frontend URLs).&lt;/li&gt;
&lt;li&gt;Never use AllowAnyOrigin() in production under any condition.&lt;/li&gt;
&lt;li&gt;Enable stricter rules for headers, methods, and credentials.&lt;/li&gt;
&lt;li&gt;Regularly review and update allowed origins as your application grows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fls9c9cjrepoq5pzha6se.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fls9c9cjrepoq5pzha6se.png" alt=" " width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Middleware Placement –Important&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CORS middleware must be registered before authentication and authorization to work correctly.&lt;/li&gt;
&lt;li&gt;Incorrect placement can cause CORS headers to be missing, even if the configuration is correct.&lt;/li&gt;
&lt;li&gt;Browsers may block requests if preflight (OPTIONS) requests are not handled properly.&lt;/li&gt;
&lt;li&gt;Placing CORS too late in the pipeline leads to confusing errors that look like auth or API issues.&lt;/li&gt;
&lt;li&gt;Proper middleware order ensures consistent behavior across all environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc45vuc4pcxltfq2ryxzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc45vuc4pcxltfq2ryxzq.png" alt=" " width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CORS configuration alone is not enough—where you place the middleware matters just as much. A secure and well-placed CORS setup prevents unnecessary errors, improves reliability, and ensures your API behaves exactly as expected in both development and production.&lt;/p&gt;

</description>
      <category>websecurity</category>
      <category>dotnet</category>
      <category>aspnetcore</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
