public Accommodation GetPrices(Accommodation a) { try { string sql = "SELECT * FROM [AccommodationPrices] WHERE [AccommodationId] = @ac"; List <KeyValuePair <string, string> > parameters = new List <KeyValuePair <string, string> >() { new KeyValuePair <string, string>("@ac", a.Id.ToString()) }; DataSet results = ExecuteSql(sql, parameters); for (int x = 0; x < results.Tables[0].Rows.Count; x++) { a.DatePrices.Add(DataSetParser.DataSetToAccommodationPrices(results, x)); } return(a); } catch { throw; } }