public ListModel <Asset> List([FromBody] ListQueryModel <AssetListQueryModel> listQuery) { if (listQuery == null) { listQuery = new ListQueryModel <AssetListQueryModel>(); } if (listQuery.Model == null) { listQuery.Model = new AssetListQueryModel(); } listQuery.Model.BranchId = _branchContext.Branch.Id; return(new ListModel <Asset> { List = _repository.List(listQuery, listQuery.Model), Count = _repository.Count(listQuery, listQuery.Model) }); }