public async Task <IActionResult> DeleteQuotationAsync([FromBody] int id) { try { _logger.LogDebug("Quotation deleting"); bool success = await _quotationService.DeleteAsync(id); if (success) { _logger.LogDebug("Quotation delete operation success."); return(Ok("Quotation deleted successfully")); } else { _logger.LogDebug("Quotation delete operation failed. Quotation not found"); return(Conflict("Quotation part not found")); } } catch (Exception ex) { //log _logger.LogError("An Exception occured: {ex}", ex.Message); _logger.LogError("Stack Trace: {ex}", ex.StackTrace); return(BadRequest()); } }