public IActionResult GetSupermarketStockCollection([ModelBinder(BinderType = typeof(ArrayModelBinder))] IEnumerable <int> ids) { if (ids == null) { return(BadRequest()); } var supermarketStockEntities = _supermarketRepository.GetSupermarketStockByIds(ids); if (ids.Count() != supermarketStockEntities.Count()) { return(NotFound()); } var supermarketStockToReturn = Mapper.Map <IEnumerable <SupermarketStockDTO> >(supermarketStockEntities); return(Ok(supermarketStockToReturn)); }