@ -13,10 +13,10 @@
/* buutti.css */
/* @theme buutti */div#\:\$p>svg>foreignObject>section .columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns12{display:grid;grid-template-columns:1fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns21{display:grid;grid-template-columns:2fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns32{display:grid;grid-template-columns:3fr 2fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns23{display:grid;grid-template-columns:2fr 3fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .columns111{display:grid;grid-template-columns:1fr 1fr 1fr;gap:calc(var(--marpit-root-font-size, 1rem) * 1)}div#\:\$p>svg>foreignObject>section .centered{display:flex;flex-direction:column;justify-content:center;text-align:center}div#\:\$p>svg>foreignObject>section .tableborderless td,div#\:\$p>svg>foreignObject>section th{border:none!important;border-collapse:collapse}div#\:\$p>svg>foreignObject>section.extra{background-color:#5d275d;background-image:linear-gradient(to bottom,#401a40,#1d0c1d);color:white}div#\:\$p>svg>foreignObject>section.extra a{color:rgb(145,255,209)}div#\:\$p>svg>foreignObject>section.exercise{background-color:#29366f;background-image:linear-gradient(to bottom,#20636a,#173742);color:white}div#\:\$p>svg>foreignObject>section.exercise a{color:rgb(211,173,255)}
/* @theme q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu */div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}< / style > < / head > < body > < div class = "bespoke-marp-osc" > < button data-bespoke-marp-osc = "prev" tabindex = "-1" title = "Previous slide" > Previous slide< / button > < span data-bespoke-marp-osc = "page" > < / span > < button data-bespoke-marp-osc = "next" tabindex = "-1" title = "Next slide" > Next slide< / button > < button data-bespoke-marp-osc = "fullscreen" tabindex = "-1" title = "Toggle fullscreen (f)" > Toggle fullscreen< / button > < button data-bespoke-marp-osc = "presenter" tabindex = "-1" title = "Open presenter view (p)" > Open presenter view< / button > < / div > < div id = ":$p" > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
/* @theme 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 */div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}< / style > < / head > < body > < div class = "bespoke-marp-osc" > < button data-bespoke-marp-osc = "prev" tabindex = "-1" title = "Previous slide" > Previous slide< / button > < span data-bespoke-marp-osc = "page" > < / span > < button data-bespoke-marp-osc = "next" tabindex = "-1" title = "Next slide" > Next slide< / button > < button data-bespoke-marp-osc = "fullscreen" tabindex = "-1" title = "Toggle fullscreen (f)" > Toggle fullscreen< / button > < button data-bespoke-marp-osc = "presenter" tabindex = "-1" title = "Open presenter view (p)" > Open presenter view< / button > < / div > < div id = ":$p" > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "1" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "1" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h1 id = "introduction-to-aspnet" > Introduction to ASP.NET< / h1 >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2" data-marpit-fragments = "8" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "2" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "2" data-marpit-fragments = "8" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "2" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "aspnet" > ASP.NET< / h2 >
< ul >
< li data-marpit-fragment = "1" > ASP.NET is a server-side framework developed by Microsoft< / li >
@ -32,7 +32,7 @@
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "3" data-marpit-fragments = "7" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "3" data-marpit-fragments = "7" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "3" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "aspnet-core" > ASP.NET Core< / h2 >
< ul >
< li data-marpit-fragment = "1" > < em > < strong > ASP.NET Core< / strong > < / em > is a complete redesign & rewrite of ASP.NET
@ -47,7 +47,7 @@
< li data-marpit-fragment = "7" > We will be focusing on Web APIs and won't be covering the frontend development tools of ASP.NET< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "4" data-marpit-fragments = "10" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "4" data-marpit-fragments = "10" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "4" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h3 id = "why-use-aspnet-core" > Why use ASP.NET Core?< / h3 >
< ul >
< li data-marpit-fragment = "1" > As a .NET application, supports < em > < strong > NuGet packages< / strong > < / em > that can be added to your projects modularly< / li >
@ -74,7 +74,7 @@
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "5" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "5" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "5" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "swagger--swagger-ui" > Swagger & Swagger UI< / h2 >
< div class = 'columns32' markdown = '1' >
< div markdown = '1' >
@ -90,7 +90,7 @@
< / div >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "6" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "6" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "6" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "6" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "exercise-1-creating-an-aspnet-core-web-application" > Exercise 1: Creating an ASP.NET Core Web Application< / h2 >
< ol >
@ -106,7 +106,7 @@
< / div >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "7" data-marpit-fragments = "3" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "7" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "7" data-marpit-fragments = "3" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "7" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "3" >
< li data-marpit-fragment = "1" > Give a < em > Project name< / em > and set a < em > Location< / em > for the repository, and check < em > Place solution and project in the same directory< / em > . Click < em > Next< / em > in the bottom right corner.< / li >
< li data-marpit-fragment = "2" > Select < em > .NET 9.0< / em > under < em > Framework< / em > . < em > Authentication type< / em > should be < em > None< / em > for now. Uncheck < em > Configure for HTTPS< / em > . Click < em > Create< / em > in the bottom right corner.< / li >
@ -123,7 +123,7 @@
< / div >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "8" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "8" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "8" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "8" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "5" >
< li data-marpit-fragment = "1" > Add < a href = "https://learn.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-8.0&tabs=visual-studio" > Swagger< / a > to your project. Go to < em > View > Other Windows > Package Manager Console< / em > and run the following command:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code > Install-Package Swashbuckle.AspNetCore -Version 6.6.2
< / code > < / pre >
@ -131,7 +131,7 @@
< / ol >
< p > < img src = "imgs/2-aspnet-core-basics_4_1.png" alt = "" / > < / p >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "9" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "9" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "9" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "9" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "6" >
< li data-marpit-fragment = "1" > Make sure < code > Program.cs< / code > includes the following lines:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > builder.Services.AddControllers();
@ -150,7 +150,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< / li >
< / ol >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "10" data-marpit-fragments = "4" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "10" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "10" data-marpit-fragments = "4" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "10" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "7" >
< li data-marpit-fragment = "1" > Start debugging from the top (the < img class = "emoji" draggable = "false" alt = "▶" src = "https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/25b6.svg" data-marp-twemoji = "" / > button with the text < em > http< / em > ).
< ul >
@ -168,7 +168,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< / li >
< / ol >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "11" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "11" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "11" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "11" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "9" >
< li data-marpit-fragment = "1" > A web page should open, showing SwaggerUI for a weather forecast API. Click it open < img class = "emoji" draggable = "false" alt = "🔽" src = "https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f53d.svg" data-marp-twemoji = "" / > .< / li >
< li data-marpit-fragment = "2" > Click < em > Try it out< / em > , and 11. < em > Execute< / em > the < strong > GET< / strong > request and see what it returns.< / li >
@ -183,7 +183,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< / div >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "12" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "12" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "12" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "12" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ol start = "12" >
< li data-marpit-fragment = "1" > Close the window. Browse through the source files on Solution Explorer on the right and check where the weather forecasts come from.< / li >
< / ol >
@ -191,7 +191,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< p > < img src = "imgs/2-aspnet-core-basics_9.png" alt = "" style = "width:600px;" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "13" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "13" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "13" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "13" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "aspnet-core-web-api-contents" > ASP.NET Core Web API contents< / h2 >
< ul >
< li data-marpit-fragment = "1" > In the previous exercise, we chose an API template for our new project, which have some files and dependencies already added< / li >
@ -204,7 +204,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< li data-marpit-fragment = "5" > You can use the API template for the assignments, though< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "14" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "14" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "14" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "14" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "programcs" > < code > Program.cs< / code > < / h2 >
< ul >
< li data-marpit-fragment = "1" > The < code > Program.cs< / code > file in ASP.NET 7 is where the < em > < strong > services< / strong > < / em > for the web application are configured and the < em > < strong > middleware< / strong > < / em > is defined< / li >
@ -219,7 +219,7 @@ builder.Services.AddSwaggerGen(); <span class="hljs-comment">// add th
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "15" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "15" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "15" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "15" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h3 id = "services" > Services< / h3 >
< ul >
< li data-marpit-fragment = "1" >
@ -239,7 +239,7 @@ builder.Services.AddSwaggerGen();
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "16" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "16" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "16" data-marpit-fragments = "3" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "16" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h3 id = "middlewares" > Middlewares< / h3 >
< ul >
< li data-marpit-fragment = "1" > Handling of each HTTP request is defined as a set of < a href = "https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-9.0" > middlewares< / a > < / li >
@ -256,7 +256,7 @@ app.Run();
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "17" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "17" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "17" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "17" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "routing" > Routing< / h2 >
< ul >
< li data-marpit-fragment = "1" > < em > < strong > Routing< / strong > < / em > is how web APIs match the requested URI to a corresponding action< / li >
@ -289,10 +289,10 @@ app.Run();
< / tbody >
< / table >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "18" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "18" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "18" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "18" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "attributes" > Attributes< / h2 >
< ul >
< li data-marpit-fragment = "1" > < em > < strong > Attributes< / strong > < / em > (< a href = "/education/csharp-basics/ 15-design-patterns-in-csharp#attributes"> see C# Basics: Lecture 15< / a > ) are a way of attaching metadata to entities (classes, methods, properties, etc.)< / li >
< li data-marpit-fragment = "1" > < em > < strong > Attributes< / strong > < / em > (< a href = "/education/csharp-basics/ src/branch/main/ 15-design-patterns-in-csharp.md #attributes"> see C# Basics: Lecture 15< / a > ) are a way of attaching metadata to entities (classes, methods, properties, etc.)< / li >
< li data-marpit-fragment = "2" > In ASP.NET, attributes have a strong role in < em > < strong > routing< / strong > < / em > :< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > [< span class = "hljs-meta" > ApiController< / span > ] < span class = "hljs-comment" > // Attribute routing requirement,< / span >
< span class = "hljs-comment" > // automatic HTTP 400 response, and more< / span >
[< span class = "hljs-meta" > Route(< span class = "hljs-string" > " [controller]" < / span > )< / span > ] < span class = "hljs-comment" > // HTTP GET requests are routed to this method< / span >
@ -310,7 +310,7 @@ app.Run();
< / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "19" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "19" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "19" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "19" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "attribute-routing" > Attribute Routing< / h2 >
< table >
< thead >
@ -344,7 +344,7 @@ app.Run();
< / tbody >
< / table >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "20" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "20" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "20" data-marpit-fragments = "1" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "20" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "exercise-2-setting-up-routes" > Exercise 2: Setting up Routes< / h2 >
< ol >
@ -355,7 +355,7 @@ instead of<br />
< / ol >
< p > You can see the route change in the Swagger UI < code > GET< / code > method.< / p >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "21" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "21" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "21" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "21" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "handling-httpget-requests" > Handling HttpGet Requests< / h2 >
< ul >
< li data-marpit-fragment = "1" > We have now established how to call methods with HTTP requests< / li >
@ -376,7 +376,7 @@ instead of<br />
< p > < img src = "imgs/2-aspnet-core-basics_10.png" alt = "" style = "width:400px;" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "22" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "22" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "22" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "22" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ul >
< li data-marpit-fragment = "1" > The URI parameters can be made optional with '?'< / li >
< li data-marpit-fragment = "2" > A default value must be then set for the method parameter:< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > [< span class = "hljs-meta" > Route(< span class = "hljs-string" > " api" < / span > )< / span > ]
@ -396,7 +396,7 @@ instead of<br />
< p > < img src = "imgs/2-aspnet-core-basics_11.png" alt = "" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "23" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "23" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "23" data-marpit-fragments = "2" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "23" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< ul >
< li data-marpit-fragment = "1" > Apply constraints for the parameters by setting them after < code > :< / code > < / li >
< li data-marpit-fragment = "2" > If the URI doesn't fit the constraints, the response will hold a < code > 404< / code > status code< pre is = "marp-pre" data-auto-scaling = "downscale-only" > < code class = "language-csharp" > [< span class = "hljs-meta" > HttpGet(< span class = "hljs-string" > " products/{id:int}" < / span > )< / span > ] < span class = "hljs-comment" > // Required type: int< / span >
@ -408,7 +408,7 @@ instead of<br />
< p > < img src = "imgs/2-aspnet-core-basics_12.png" alt = "" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "24" data-marpit-fragments = "4" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "24" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "24" data-marpit-fragments = "4" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "24" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "exercise-3-returning-your-own-list" > Exercise 3: Returning Your Own List< / h2 >
< ol >
@ -424,7 +424,7 @@ instead of<br />
< / li >
< / ol >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "25" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "25" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "25" data-marpit-fragments = "5" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "25" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "postman" > Postman< / h2 >
< ul >
< li data-marpit-fragment = "1" > HTTP < code > POST< / code > requests cannot be made with the browser's address bar, only < code > GET< / code > !< / li >
@ -437,7 +437,7 @@ instead of<br />
< p > < img src = "imgs/2-aspnet-core-basics_13.png" alt = "" style = "width:500px;" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "26" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "invert" data-marpit-pagination = "26" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "26" data-marpit-fragments = "4" data-paginate = "true" data-class = "invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "invert" data-marpit-pagination = "26" style = "--paginate:true;--class:invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "benefits-of-using-postman" > Benefits of using Postman< / h2 >
< ul >
< li data-marpit-fragment = "1" > When developing APIs, tools like Postman will almost always surface in the development cycle< / li >
@ -446,7 +446,7 @@ instead of<br />
< li data-marpit-fragment = "4" > Supports all the necessary HTTP requests, like < code > GET< / code > , < code > POST< / code > , < code > PUT< / code > and < code > DELETE< / code > < / li >
< / ul >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "27" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "27" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "27" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "27" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" >
< h2 id = "exercise-4-creating-requests-with-postman" > Exercise 4. Creating requests with Postman< / h2 >
< p > Run the Weather API program, and test both methods with Postman.< / p >
@ -461,7 +461,7 @@ instead of<br />
< p > < img src = "imgs/2-aspnet-core-basics_14.png" alt = "" style = "width:800px;" / > < / p >
< / div >
< / section >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "28" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu " lang = "en-US" class = "exercise invert" data-marpit-pagination = "28" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: q9g8pwk8o1e8yp1x1lh2axm11ifk4xnwnr1cb8m3hcu ;" data-marpit-pagination-total = "28" > < div class = 'columns23' markdown = '1' >
< / foreignObject > < / svg > < svg data-marpit-svg = "" viewBox = "0 0 1280 720" > < foreignObject width = "1280" height = "720" > < section id = "28" data-marpit-fragments = "2" data-paginate = "true" data-class = "exercise invert" data-heading-divider = "5" data-theme = " 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 " lang = "en-US" class = "exercise invert" data-marpit-pagination = "28" style = "--paginate:true;--class:exercise invert;--heading-divider:5;--theme: 8lh3rjev3cpwiqc307miuofc8u1wrc5dagzppz442 ;" data-marpit-pagination-total = "28" > < div class = 'columns23' markdown = '1' >
< div markdown = '1' >
< ol start = "2" >
< li data-marpit-fragment = "1" > Create your request by selecting the method and entering the URL< / li >