예제 #1
0
        public void RepairTieFighterByCode(string code)
        {
            var fighter = _repository.GetTieFighterByCode(code);

            // Check if object is not null before accessing it
            if (fighter != null)
            {
                fighter.IsDamaged = false;
            }
        }
예제 #2
0
        public IActionResult Get(string code)
        {
            var item = _tieFighterRepository.GetTieFighterByCode(code);

            return(Ok(item));
        }