Lately I\'ve been working on stored procedure and encountered 1 strange problem.
First, I was able to successfully call a stored procedure from the database via:
If the stored procedure is only for update/insert, the following can be used as well.
string cmd = Constants.StoredProcs.usp_AddRoles.ToString() + " @userId, @roleIdList";
int result = db.Database
.ExecuteSqlCommand
(
cmd,
new SqlParameter("@userId", userId),
new SqlParameter("@roleIdList", roleId)
);