public async Task <IActionResult> Get( [FromQuery] BranchFilter filterModel, [FromQuery] Sortable sortable, [FromQuery] Paginable paginable) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = new PagingResult <BranchModel>(); if (filterModel.BranchIds.Any()) { return(Ok(await _branchManager.GetBranchesById(filterModel.BranchIds))); } result = await _branchManager.GetBranches(filterModel, sortable, paginable); return(Ok(result)); }