public IActionResult Add(Maintenance maintenance)
        {
            var result = _maintenanceService.Add(maintenance);

            if (result.Success)
            {
                return(Ok(result.Message));
            }

            return(BadRequest(result.Message));
        }
예제 #2
0
        public IActionResult Add(MaintenanceDto maintenanceDto)
        {
            var response = new ResponseViewModel();

            response = _maintenanceService.Add(maintenanceDto);

            if (!response.IsSuccess)
            {
                return(BadRequest(response));
            }

            return(Ok(response));
        }