public IPagedList <CardAccountBriefModel> GetCardAccounts(AccountQuery query) { EnsureIsValid(query); try { var accounts = _deps.CardAccounts.QueryPage(query.ToDbQuery <CardAccount>()); return(accounts.Map <CardAccountBriefModel>()); } catch (Exception ex) { throw new ServiceException("Cannot get card accounts.", ex); } }
public IPagedList<CardAccountBriefModel> GetCardAccounts(AccountQuery query) { EnsureIsValid(query); try { var accounts = _deps.CardAccounts.QueryPage(query.ToDbQuery<CardAccount>()); return accounts.Map<CardAccountBriefModel>(); } catch (Exception ex) { throw new ServiceException("Cannot get card accounts.", ex); } }