This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
using System.ComponentModel.DataAnnotations; | |
using Microsoft.EntityFrameworkCore; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
app.MapPost("/todos", async (CreateTodo createTodo, TodoDb db) => | |
{ | |
// This is where the implicit conversion comes in | |
db.Todos.Add(createTodo); |
This document now exists on the official ASP.NET core docs page.