public MotorBoats SearchMotorBoats(string searchString, SortOrder sortOrder, decimal priceMin, decimal priceMax, BoatType type, int? lengthMin, int? lengthMax, DateTime dateFrom, int? page, int? rows)
{
var url = String.Format(Constants.Culture, "{0}/{1}/Boats{2}", Constants.SEARCH, Constants.MOTORS, Constants.XML);
_addAnd = false;
// create the parameters for the query string
var conditions = "?";
conditions += SearchMethods.ConstructQueryHelper(Constants.SEARCH_STRING, searchString, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.SORT_ORDER, string.Empty + sortOrder, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.PRICE_MIN, string.Empty + priceMin, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.PRICE_MAX, string.Empty + priceMax, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.TYPE, type.ToString(), _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.LENGTH_MIN, string.Empty + lengthMin, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.LENGTH_MAX, string.Empty + lengthMax, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.DATE_FROM, Client.DateToStringConverter(dateFrom), _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.PAGE, string.Empty + page, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.ROWS, string.Empty + rows, _addAnd);
// add the parameters to the query string if there are any
if (conditions.Equals("?"))
{
url += conditions;
}
// perform the request
return this.SearchMotorBoats(url);
}