<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Minimal_API</id>
		<title>Minimal API - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Minimal_API"/>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Minimal_API&amp;action=history"/>
		<updated>2026-05-07T19:57:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://logicwiki.co.uk/index.php?title=Minimal_API&amp;diff=2648&amp;oldid=prev</id>
		<title>AliIybar: Created page with &quot;Category:ASP.NET Category:Core  == What is Minimal API == Instead of creating controllers and classes, you define endpoints inline in your app startup (usually Program...&quot;</title>
		<link rel="alternate" type="text/html" href="https://logicwiki.co.uk/index.php?title=Minimal_API&amp;diff=2648&amp;oldid=prev"/>
				<updated>2026-05-05T08:04:48Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:ASP.NET&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:ASP.NET (page does not exist)&quot;&gt;Category:ASP.NET&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Core&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Core (page does not exist)&quot;&gt;Category:Core&lt;/a&gt;  == What is Minimal API == Instead of creating controllers and classes, you define endpoints inline in your app startup (usually Program...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ASP.NET]]&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
&lt;br /&gt;
== What is Minimal API ==&lt;br /&gt;
Instead of creating controllers and classes, you define endpoints inline in your app startup (usually Program.cs). It’s designed for:&lt;br /&gt;
* Simple APIs&lt;br /&gt;
* Microservices&lt;br /&gt;
* Prototypes&lt;br /&gt;
* High-performance endpoints with minimal overhead&lt;br /&gt;
== How they’re used ==&lt;br /&gt;
You define routes and handlers directly:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var app = WebApplication.Create();&lt;br /&gt;
&lt;br /&gt;
app.MapGet(&amp;quot;/hello&amp;quot;, () =&amp;gt; &amp;quot;Hello world&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
app.MapGet(&amp;quot;/products/{id}&amp;quot;, (int id) =&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    return Results.Ok(new { Id = id, Name = &amp;quot;Sample product&amp;quot; });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
app.Run();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Key ideas ==&lt;br /&gt;
* Routes + logic in one place (no controller layer)&lt;br /&gt;
* Uses standard HTTP verbs: MapGet, MapPost, etc.&lt;br /&gt;
* Supports dependency injection directly in parameters&lt;br /&gt;
* Works alongside full MVC if needed&lt;br /&gt;
== Example with dependency injection ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app.MapGet(&amp;quot;/time&amp;quot;, (ILogger&amp;lt;Program&amp;gt; logger) =&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    logger.LogInformation(&amp;quot;Time requested&amp;quot;);&lt;br /&gt;
    return DateTime.Now;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>AliIybar</name></author>	</entry>

	</feed>