public ActionResult <Quotation> Get(int id) { try { _logger.LogDebug("Fetching Quotation"); Quotation quote = _quotationService.Get(id); if (quote != null) { _logger.LogDebug("Quotation fetch operation success."); return(Ok(quote)); } else { _logger.LogDebug("Quotation fetch operation failed. Quoatation not found."); return(Conflict("Quotation not Found")); } } catch (Exception ex) { //Log _logger.LogError("An Exception occured: {ex}", ex.Message); _logger.LogError("Stack Trace: {ex}", ex.StackTrace); return(BadRequest(ex)); } }