Repository navigation
Conversation
guardrex
left a comment
There was a problem hiding this comment.
Thanks, @SkyDevLab!
I'd like to hear back from Genevieve on a few points, and then we'll get on with the final push here. I'll ping Mike for review on this one to make sure it hits everything that he'd like to do.
|
|
||
| Minimal APIs support the configuration and customization needed to scale to multiple APIs, handle complex routes, apply authorization rules, and control the content of API responses. | ||
|
|
||
| ### Getting started with Minimal APIs |
There was a problem hiding this comment.
Let's make one change tho because we'd prefer to avoid an unpaired H3. Let's go this way (and you're welcome to change the other instances of this further down the article.
| ### Getting started with Minimal APIs | |
| Getting started with Minimal APIs: |
There was a problem hiding this comment.
Updated as suggested.
|
|
||
| * **Tutorial**: <xref:tutorials/min-web-api> | ||
| * **Quick reference**: <xref:fundamentals/minimal-apis> | ||
| * **Examples**: For a full list of common scenarios with code examples, see <xref:fundamentals/minimal-apis> |
There was a problem hiding this comment.
This is another one that you're welcome to change further down the article if it appears. Because this is a complete sentence, we should have a period at the end of it.
| * **Examples**: For a full list of common scenarios with code examples, see <xref:fundamentals/minimal-apis> | |
| * **Examples**: For a full list of common scenarios with code examples, see <xref:fundamentals/minimal-apis>. |
There was a problem hiding this comment.
Updated as suggested.
|
|
||
| ## Controller-based APIs - Alternative approach | ||
|
|
||
| While Minimal APIs are recommended, ASP.NET Core also supports a controller-based alternative approach where controllers are classes that derive from <xref:Microsoft.AspNetCore.Mvc.ControllerBase>. This approach follows traditional object-oriented patterns and may be preferred for: |
There was a problem hiding this comment.
@gewarren ... The former content managers didn't care about localization of fragments that lead into lists. Do you want to keep going with their lack of concern about it, or would you prefer that we ... as you said recently ... stick to the style manual as closely as possible? For example here, I'm fleshing out the lead-in sentence that could help MT do a better job. What the former managers would have probably suggested is punctuating the list items as objects of the preposition "for" ... i.e. ... completing the sentence.
Also noting in passing that the list items aren't complete sentences for my suggestion or completing the lead-in sentence, so I'm not punctuating them. We can handle this differently if you prefer.
| While Minimal APIs are recommended, ASP.NET Core also supports a controller-based alternative approach where controllers are classes that derive from <xref:Microsoft.AspNetCore.Mvc.ControllerBase>. This approach follows traditional object-oriented patterns and may be preferred for: | |
| While Minimal APIs are recommended, ASP.NET Core also supports a controller-based alternative approach where controllers are classes that derive from <xref:Microsoft.AspNetCore.Mvc.ControllerBase>. This approach follows traditional object-oriented patterns and may be preferred for the following scenarios: |
There was a problem hiding this comment.
Updated as suggested.
|
|
||
| :::code language="csharp" source="~/fundamentals/apis/APIWithControllers/WeatherForecast.cs"::: | ||
|
|
||
| ## Choosing between approaches |
There was a problem hiding this comment.
Let's avoid the gerund here ... the localization team asked us to avoid them in headings when possible (note that common words, such as 'logging,' are fine).
| ## Choosing between approaches | |
| ## Choose between approaches |
There was a problem hiding this comment.
Updated as suggested.
| * **Easier testing** - Simplified unit and integration testing | ||
| * **Modern approach** - Leverages the latest .NET features and C# innovations | ||
|
|
||
| **Consider controller-based APIs only if you specifically need**: |
There was a problem hiding this comment.
We'll complete the sentence and leave the list alone ...
| **Consider controller-based APIs only if you specifically need**: | |
| **Consider controller-based APIs only if you specifically need any of the following**: |
There was a problem hiding this comment.
Updated as suggested.
| **Start with Minimal APIs for most projects**. They offer: | ||
|
|
||
| * **Streamlined experience and simpler syntax** - Less boilerplate code and faster setup | ||
| * **Better performance** - Reduced overhead compared to controllers | ||
| * **Easier testing** - Simplified unit and integration testing | ||
| * **Modern approach** - Leverages the latest .NET features and C# innovations |
There was a problem hiding this comment.
@gewarren ... This is another case where former management allowed great flexibility to authors. The styles call for just bold and a period. This doc set is full of bold with dashes or colons ... sometimes no bold. It's kind'a all over the place 😄, but at least usually consistent within a single article. Do you want to do anything in particular going forward ... establish a clear convention (e.g., style manual: bold, sentence case, plain text period)? I think it would go like this ...
| **Start with Minimal APIs for most projects**. They offer: | |
| * **Streamlined experience and simpler syntax** - Less boilerplate code and faster setup | |
| * **Better performance** - Reduced overhead compared to controllers | |
| * **Easier testing** - Simplified unit and integration testing | |
| * **Modern approach** - Leverages the latest .NET features and C# innovations | |
| **Start with Minimal APIs for most projects**. Minimal APIs offer the following features: | |
| * **Streamlined experience and simpler syntax**. There's less boilerplate code and faster setup. | |
| * **Better performance**. Minimal APIs have reduced overhead compared to controllers. | |
| * **Easier testing**. They simplify unit and integration testing. | |
| * **Modern approach**. The API can leverage the latest .NET features and C# innovations. |
There was a problem hiding this comment.
Updated as suggested.
| * [Application parts](xref:mvc/extensibility/app-parts) or the [application model](xref:mvc/controllers/application-model) | ||
| * [OData](https://www.nuget.org/packages/Microsoft.AspNetCore.OData/) support | ||
|
|
||
| Most of these features can be implemented in Minimal APIs with custom solutions, but controllers provide them out of the box. |
There was a problem hiding this comment.
| Most of these features can be implemented in Minimal APIs with custom solutions, but controllers provide them out of the box. | |
| Most of the preceding features can be implemented in Minimal APIs with custom solutions, but controllers provide them natively. |
That 'natively' could also be 'automatically' ... 🤔 ... or 'by default.' I'm just not quite feeling that 'out of the box' would be understood in all languages and regions of the world. 😄
There was a problem hiding this comment.
Updated as suggested.
|
|
||
| Most of these features can be implemented in Minimal APIs with custom solutions, but controllers provide them out of the box. | ||
|
|
||
| ## See also |
There was a problem hiding this comment.
| ## See also | |
| ## Related content |
There was a problem hiding this comment.
Updated as suggested.
| * <xref:tutorials/min-web-api> - Minimal API tutorial | ||
| * <xref:fundamentals/minimal-apis> - Minimal APIs quick reference | ||
| * <xref:web-api/index> - Controller-based APIs overview | ||
| * <xref:tutorials/first-web-api> - Controller-based API tutorial |
There was a problem hiding this comment.
These are obvious from their article titles ...
| * <xref:tutorials/min-web-api> - Minimal API tutorial | |
| * <xref:fundamentals/minimal-apis> - Minimal APIs quick reference | |
| * <xref:web-api/index> - Controller-based APIs overview | |
| * <xref:tutorials/first-web-api> - Controller-based API tutorial | |
| * <xref:tutorials/min-web-api> | |
| * <xref:fundamentals/minimal-apis> | |
| * <xref:web-api/index> | |
| * <xref:tutorials/first-web-api> |
There was a problem hiding this comment.
Updated as suggested.
Strengthens recommendation for Minimal APIs over Controller-based APIs for ASP.NET Core 10.0+ per content team plan.
Fixes #35808
Internal previews
Build report