コード例 #1
0
        public IActionResult Add(FirmDTO firmDto)
        {
            _mapper = FirmMapping.GetMapper().CreateMapper();
            Firm firm = _mapper.Map <FirmDTO, Firm>(firmDto);

            var result = _Firmservice.Add(firm);

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

            return(BadRequest(result.Success.ToString() + "and " + result.Message));
        }