❔ how to get city data from request body?

app.MapPost("/cities", async (DataContext dataContext) => {
    dataContext.Cities.Add(city);
    await dataContext.SaveChangesAsync();
    return Results.Created();
});
Was this page helpful?