Created
January 1, 2017 22:25
-
-
Save renatogroffe/41d86d52e2f0989c418582be24bbf621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.AspNetCore.Mvc; | |
namespace TesteAPIRESTLinux.Controllers | |
{ | |
[Route("api/[controller]")] | |
public class ConversorAlturasController : Controller | |
{ | |
[HttpGet("PesMetros/{alturaPes}")] | |
public object Get(double alturaPes) | |
{ | |
return new | |
{ | |
AlturaPes = alturaPes, | |
AlturaMetros = Math.Round(alturaPes * 0.3048, 4) | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment