Ejemplo n.º 1
0
        public async Task <ActionResult <int> > UnitTypeNumber(int armyId, UnitTypes unitType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState.Values));
            }

            var result = await _armyService.GetSumNumberOfUnitsByType(armyId, unitType);

            return(Ok(result));
        }