EF 执行存储过程方法:
SqlParameter[] parms = new SqlParameter[] {
new SqlParameter("@Detail_Item_ID",model.DETAIL_ITEM_ID),
SqlParameter("@Detail_Item_ID1",model.DETAIL_ITEM_ID),
};
int n = db.Database.ExecuteSqlCommand("P_TOOL_BILL_EXPTMP_Check @Detail_Item_ID,@Detail_Item_ID1", parms);
--该方法以验证
SqlParameter[] parameter = new SqlParameter[3];
parameter[0] = new SqlParameter("@ROLEGUID", UserInRoleModel.ROLEGUID);
parameter[1] = new SqlParameter("@USERGUID", UserInRoleModel.USERGUID);
parameter[2] = new SqlParameter("@NewUSERGUID",model.EmployeeGUID);
int c= DataBase.Database.ExecuteSqlCommand("UPDATE T_FRAME_USERINROLE SET USERGUID=@NewUSERGUID WHERE ROLEGUID=@ROLEGUID and USERGUID= @USERGUID", parameter);