public void MakeInquiry(CreateInquiryDto inquiryDto) { Inquiry inquiry = _mapper.Map <Inquiry>(inquiryDto); _repositoryFactory.InquiryRepository.Create(inquiry); _logger.LogInformation("Inquiry Successfully Created"); }
public IActionResult MakeInquiry([FromBody] CreateInquiryDto createInquiry) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _inquiryService.MakeInquiry(createInquiry); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }