📅  最后修改于: 2022-03-11 15:00:27.049000             🧑  作者: Mango
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
(@"EXECUTE YourSP @InCompanyCode,@InBranchCode", parameters).ToList(); }