Is this really true that order of sql parameters in sql stored procedure must match the order of sql parameters used in SqlSquery:
var Parameter = new List<SqlParameter>();
Parameter.Add(new SqlParameter("@ParamOne", 1));
Parameter.Add(new SqlParameter("@ParamTwo", 2));
Parameter.Add(new SqlParameter("@ParamThree", 3));
context.Database.SqlQuery<myEntityType>("exec sp_Stored_Procedure @ParamOne, @ParamTwo, @ParamThree", Parameter.ToArray()).ToList<myEntityType>();
And in case sql developer decides to change stored procedure in the following way
ALTER PROCEDURE [dbo].[sp_Stored_Procedure]
@ParamOne as int,
@ParamTwo as int,
@ParamThree as int,
AS ......
the result set will be empty?
This could raise many issues and I am asking is there something I am missing in this scenario?
sp_prefix for your stored procedures. Microsoft has reserved that prefix for its own use (see Naming Stored Procedures), and you do run the risk of a name clash sometime in the future. It's also bad for your stored procedure performance. It's best to just simply avoidsp_and use something else as a prefix - or no prefix at all!