public IHttpActionResult GetStatus(Guid orderId) { OrderAccess oAccess = new OrderAccess(); string status = oAccess.GetStatusByOrderId(orderId); if (!string.IsNullOrEmpty(status)) { return(Ok(new { orderId = orderId, status = status })); } else { return(BadRequest("Order not found")); } }