Entity Framework Core: Database operation expected to affect 1 row(s) but actually affected 0 row(s) [duplicate]
问题 This question already has answers here : Unable to edit db entries using EFCore, EntityState.Modified: “Database operation expected to affect 1 row(s) but actually affected 0 row(s).” (11 answers) Closed 7 days ago . I am using Sql Server on Linux with EC Core (2.1.0-preview1-final) I am trying to update some data coming from a web Api service (PUT) request. The data (ticket) is passed correctly and gets deserialised into an object (ticket). When I try to update, I use the following code: