Last active
February 5, 2017 10:27
-
-
Save thehoneymad/c58a7c521291747ea673f9ae62a6a240 to your computer and use it in GitHub Desktop.
Testing out .net core routing
This file contains hidden or 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
| namespace RocheClinicalTrial.Controllers | |
| { | |
| [AllowAnonymous] | |
| [Route("api/[controller]")] | |
| public class RocheClinicalTrialController : Controller | |
| { | |
| // GET: api/values | |
| [HttpGet] | |
| public JsonResult Get() | |
| { | |
| var repo = new Repository.Repository(); | |
| var data = repo.GetData(); | |
| return Json(data); | |
| } | |
| [HttpGet("{searchCriteria}")] | |
| public string Get(string searchCriteria) | |
| { | |
| System.Console.WriteLine(searchCriteria); | |
| return "value"; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment