sp_executesql processes uniqueidentifier-param with EntityCommandExecutionException but still acts like expected
You use an API that expects a result set (SqlQuery&lt;...&gt;(...)) but your stored procedure produces no result set. Hence the error message. The error occurs on the client side, after your procedure has executed, to explain the 'magic' you see.

You have several alternatives:


Use a non-query API, like ExecuteSqlCommand
have your stored procedure produce a result set, using the OUTPUT clause of INSERT.
Map the stored procedure in EF