public string GetBids(string agency, string category, string location, string title) { string response = String.Empty; AvailBidResponse availBidRes = new AvailBidResponse(); AvailBidResponseAvailBids availBids = new AvailBidResponseAvailBids(); try { availBids.Bid = GovBidsDAL.FetchDataBids(agency, category, location, title).ToArray(); availBidRes.Items = new AvailBidResponseAvailBids[] { availBids }; response = Serialize(availBidRes); } catch (Exception ex) { AvailBidResponseException exception = new AvailBidResponseException(); exception.Error = ex.Message; response = Serialize(exception); } finally { availBidRes = null; availBids = null; } return(response); }
public string GetBids(string agency, string category, string location, string title) { string response = String.Empty; AvailBidResponse availBidRes = new AvailBidResponse(); AvailBidResponseAvailBids availBids = new AvailBidResponseAvailBids(); try { availBids.Bid = GovBidsDAL.FetchDataBids(agency, category, location, title).ToArray(); availBidRes.Items = new AvailBidResponseAvailBids[] { availBids }; response = Serialize(availBidRes); } catch (Exception ex) { AvailBidResponseException exception = new AvailBidResponseException(); exception.Error = ex.Message; response = Serialize(exception); } finally { availBidRes = null; availBids = null; } return response; }