using (var entities = new YourEntities())
{
SqlParameter[] parameters =
{
new SqlParameter{
SqlDbType = SqlDbType.NVarChar,
Size = -1,
Direction = ParameterDirection.Input,
ParameterName = "InCompanyCode",
Value = SD.Company
},
new SqlParameter{
SqlDbType = SqlDbType.NVarChar,
Size = -1,
Direction = ParameterDirection.Input,
ParameterName = "InDebugModeOn",
Value = "0"
}
};
return entities.Database.SqlQuery<Your_Model>
(@"EXECUTE YourSP @InCompanyCode,@InBranchCode", parameters).ToList(); }