public static DataSet GetDataSetStatic(string storedProcedureName, List <SqlParameter> parameters, ref int returnValue) { DBLayer dbLayer = new DBLayer(); DataSet result = dbLayer.GetDataSet(storedProcedureName, parameters, ref returnValue); dbLayer.Dispose(); return(result); }
internal static List <T> CreateObjectListFromDataSet <T>(DataSet ds, object objectToFill) { List <T> result = new List <T>(); // also have to maintain count to expand and copy if (DBLayer.ValidateHasRows(ds)) { foreach (DataRow row in ds.Tables[0].Rows) { result.Add(CreateObjectFromDataRow <T>(row, objectToFill)); } } return(result); }