© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
Timo Martinson

❔ how to get city data from request body?

app.MapPost("/cities", async (DataContext dataContext) => {
    dataContext.Cities.Add(city);
    await dataContext.SaveChangesAsync();
    return Results.Created();
});
app.MapPost("/cities", async (DataContext dataContext) => {
    dataContext.Cities.Add(city);
    await dataContext.SaveChangesAsync();
    return Results.Created();
});
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Body request
C#CC# / help
2y ago
❔ How to get specific fields from a Http GET request
C#CC# / help
3y ago
✅ How to get data from entity without includes?
C#CC# / help
4mo ago
How to capture request body in IIS managed module
C#CC# / help
5mo ago