public List<DTO_HSData_SData> GetSInformationForProcure(int sId)
{
var sApproval = new List<DTO_HSData_SData>();
using (var db = new SContext())
{
using (db.Database.Connection)
{
var context = ((IObjectContextAdapter)db).ObjectContext;
db.Database.Connection.Open();
DbCommand cmd = db.Database.Connection.CreateCommand();
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.CommandText = "USP_GetHealthAndSafetyStatus_ForProcurement_BySupplierID";
cmd.Parameters.Add(new SqlParameter("@SId", sId));
supplierApproval = context.Translate<DTO_HSData_SData>(cmd.ExecuteReader()).ToList();
db.Database.Connection.Close();
}
}
return sApproval ;
}
No comments:
Post a Comment