Example #1
0
        public IActionResult CreateATMBattery(ATMBatteryCreateRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _ATMBatteryRepository.CreateATMBattery(request);
            return(Ok());
        }
Example #2
0
 public void CreateATMBattery(ATMBatteryCreateRequest battery)
 {
     _dbContext.AtmBatteries.Add(_mapper.Map <ATMBattery>(battery));
     _dbContext.SaveChanges();
 }