Skip to content

Commit

Permalink
Added missing SaveChanges in Post method (MicrosoftDocs#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterVMB authored Jul 25, 2024
1 parent c007424 commit 18eba4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Odata-docs/webapi-8/tutorials/basic-crud.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ To support this request, we add a controller action named `Post` (or `PostCustom
public ActionResult Post([FromBody] Customer customer)
{
db.Customers.Add(customer);

db.SaveChanges();

return Created(customer);
}
Expand Down

0 comments on commit 18eba4c

Please sign in to comment.