From 4ba69f958b4affcfa66e85a3c29282ae76bbd507 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 28 Oct 2021 09:02:57 -1000 Subject: [PATCH] Update samples with snippets /4 (#23676) * Update samples with snippets /4 * Update samples with snippets /4 --- aspnetcore/fundamentals/minimal-apis.md | 40 ++----------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/aspnetcore/fundamentals/minimal-apis.md b/aspnetcore/fundamentals/minimal-apis.md index e4a28e4e68..2e9af9d58b 100644 --- a/aspnetcore/fundamentals/minimal-apis.md +++ b/aspnetcore/fundamentals/minimal-apis.md @@ -9,8 +9,6 @@ no-loc: [Home, Privacy, Kestrel, appsettings.json, "ASP.NET Core Identity", cook uid: fundamentals/minimal-apis.md --- - - # Minimal APIs overview This document provides an overview of minimal APIs. The minimal APIs consist of: @@ -157,32 +155,11 @@ This section contains sample code using - [WebApplication.CreateBuilder](xref:Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder%2A) initializes a new instance of the class with preconfigured defaults. - + +For more information, see ### Change the content root, app name, and environment by environment variables or command line @@ -236,21 +213,8 @@ The following code reads `HelloKey` from configuration and displays the value at ### Add services -```csharp -var builder = WebApplication.CreateBuilder(args); - -// Add the memory cache services. -builder.Services.AddMemoryCache(); - -// Add a custom scoped service. -builder.Services.AddScoped(); -var app = builder.Build(); -``` - - ### Customize the IHostBuilder