Last active
September 5, 2018 08:01
-
-
Save finniv/ea413b304049fe9f3ebfb3a0ceb70d12 to your computer and use it in GitHub Desktop.
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 Cepheia.Api.Controllers | |
| open Microsoft.AspNetCore.Mvc | |
| open Microsoft.IdentityModel.Protocols.WsFederation | |
| open System.Web.Http | |
| open Microsoft.AspNetCore.Routing | |
| [<Route("api/[controller]")>] | |
| [<ApiController>] | |
| type ValuesController () = | |
| inherit ControllerBase() | |
| [<HttpGet>] | |
| member this.Get() = | |
| let values = [|"value1"; "value2"|] | |
| ActionResult<string[]>(values) | |
| [<HttpGet("{id}")>] | |
| member this.Get([<FromQuery>]id:int) = | |
| let value = id.ToString(); | |
| ActionResult<string>(value) | |
| [<HttpPost>] | |
| member this.Post([<FromBody>] value:string) = | |
| () | |
| [<HttpPut("{id}")>] | |
| member this.Put(id:int, [<FromBody>] value:string ) = | |
| () | |
| [<HttpDelete("{id}")>] | |
| member this.Delete(id:int) = | |
| () | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment