Execute mysql stored procedure
var affectedRows =
context.Database.ExecuteSqlCommand("exec UpdateStatus @p_customerId, @p_id",
new MySqlParameter("p_customerId", "006"),
new MySqlParameter("p_id", 9));
Get MySqlException
An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in EntityFramework.dll
Additional information: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exec UpdateStatus '006', 9' at line 1
When I try to replace stored procedure name with a Update statement it works. But I want to call a stored procedure instead.
I tried using Entity Framework 5 and 6 same error