public async Task <IEnumerable <IUomState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null) { IEnumerable <IUomState> states = null; var q = new UomsGetQuery(); q.FirstResult = firstResult; q.MaxResults = maxResults; q.Sort = UomProxyUtils.GetOrdersQueryValueString(orders); q.Fields = UomProxyUtils.GetReturnedFieldsQueryValueString(fields, QueryFieldValueSeparator); q.Filter = UomProxyUtils.GetFilterQueryValueString(filter); var req = new UomsGetRequest(); req.Query = q; var resp = await _ramlClient.Uoms.Get(req); UomProxyUtils.ThrowOnHttpResponseError(resp); states = (resp.Content == null) ? null : resp.Content.Select(e => e.ToUomState()); return(states); }