we are using vs 2012.
I wrote the below method to execute executesqlcommand on dbcontext.
//Check lock conditions for site part vrsm
public bool CanLock(int spvId)
{
SqlParameter output = new SqlParameter("editMode", SqlDbType.Bit);
output.Direction = ParameterDirection.Output;
SqlParameter parameter = new SqlParameter("spvId", SqlDbType.Int);
parameter.Value = spvId;
ExecuteProcedure("exec [dbo].[prc_SitePartVrsn_CanLock] {0}, @editMode = {1} output", parameter, output);
return Convert.ToBoolean(output.Value);
}
This is very old way of passing parameters. Do we have any better way of doing it in c# 4.5 vs 2012.
please help...