Reputation: 22323
i try:
List<KeyValuePair<string, object>> ParamCollOutput= new List<KeyValuePair<string, object>>();
ParamCollOutput.Add(new KeyValuePair<string, object>("@MenuID", SqlDbType.Int));
ParamCollOutput.Direction = ParameterDirection.Output;
but i got a error in Direction
.Does not contain a defn for...
.I know its not a valid way to declare but how should i get the value and assign it in int a
.SP is not a problem.Thanks for a help.
Upvotes: 1
Views: 92
Reputation: 60506
List<T>
does not implement Direction
.
I think you want to do this...
SqlParameterCollection coll = new SqlParameterCollection();
coll.Add(new SqlParameter("@MenuId", 123) { Direction = ParameterDirection.Output });
Upvotes: 3