Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
API con un parámetro llamado palabra clave en C#

Una de las llamadas de API desde una empresa externa a nuestro uso es el nombre de parámetro "ref". Nos piden que creemos la API web que acepte este parámetro. Estamos escribiendo en C# Web Api y "ref" es una palabra clave y no podrá hacerlo. Cualquier trabajo alrededor?

https://xxxxxxxxx/xxx/xxx/xxxxx/?ref=1234

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Puede aceptar ref como parámetro usando el símbolo @ delante de su campo:

 public JsonResult MyMethod(string @ref)

Puedes leer más aquí

over 4 years ago · Santiago Trujillo Report

0

También puede usar la propiedad Name de FromUriAttribute :

 public JsonResult MyMethod([FromUri(Name = "ref")] string reference)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!