public Environment Get(string uri) { ResolveEnvironmentService(); try { var environmentUri = new Uri(uri, UriKind.Absolute); var environment = environmentService.Get(environmentUri); return(environment); } catch (UriFormatException) { throw new HttpResponseException(HttpStatusCode.NotFound); } }
public async Task <IActionResult> Get() { var result = await environmentService.Get(); return(Ok(result)); }
public IActionResult Get(int id) { return(Ok(_service.Get(id))); }
public async Task <IActionResult> Get(Guid environmentId) { var environment = await _environmentService.Get(environmentId); return(Ok(environment)); }