常用方法
常用方法
常用方法
常用方法
public IHttpActionResult Get(double amount, string codeA, string codeX) { try { if (codeA == "pln") { return(Ok(request.ConvertPLNToX(amount, codeX))); } if (codeX == "pln") { return(Ok(request.ConvertXToPLN(amount, codeA))); } return(Ok(request.Convert(amount, codeA, codeX))); } catch (NullReferenceException e) { return(BadRequest(e.Message)); } }