[Codefixer] Recommend using `TypedResults` over using `Results`
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
## Background and Motivation
- Recommend returning `TypedResults` instead of `Results`
- Recommend adding the `Results<>` return type to your class
```csharp
app.MapGet("/", (int id) => SomeCondition(id) ? Results.Ok() : Results.NotFound());
```
Becomes
```csharp
app.MapGet("/", (int id) => SomeCondition(id) ? TypedResults.Ok() : TypedResults.NotFound());
```
And further becomes:
```csharp
app.MapGet("/", Results(int id) => SomeCondition(id) ? TypedResults.Ok() : TypedResults.NotFound());
```
## Proposed Analyzer
### Analyzer Behavior and Message
### Category
- [ ] Design
- [ ] Documentation
- [ ] Globalization
- [ ] Interoperability
- [ ] Maintainability
- [ ] Naming
- [ ] Performance
- [ ] Reliability
- [ ] Security
- [ ] Style
- [ ] Usage
### Severity Level
- [ ] Error
- [X] Warning
- [ ] Info
- [ ] Hidden
## Usage Scenarios
## Risks
Contributor guide
Assessment
This issue has not been assessed yet.