public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new UserPermissionMvosCountGetQuery();

            q.Filter = UserPermissionMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new UserPermissionMvosCountGetRequest();

            req.Query = q;
            var resp = await _ramlClient.UserPermissionMvosCount.Get(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(long.Parse(await resp.RawContent.ReadAsStringAsync()));
        }
        public async Task <IEnumerable <IUserPermissionMvoState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null)
        {
            IEnumerable <IUserPermissionMvoState> states = null;
            var q = new UserPermissionMvosGetQuery();

            q.FirstResult = firstResult;
            q.MaxResults  = maxResults;
            q.Sort        = UserPermissionMvoProxyUtils.GetOrdersQueryValueString(orders);
            q.Fields      = UserPermissionMvoProxyUtils.GetReturnedFieldsQueryValueString(fields, QueryFieldValueSeparator);
            q.Filter      = UserPermissionMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new UserPermissionMvosGetRequest();

            req.Query = q;
            var resp = await _ramlClient.UserPermissionMvos.Get(req);

            UserPermissionMvoProxyUtils.ThrowOnHttpResponseError(resp);
            states = resp.Content;
            return(states);
        }