Ejemplo n.º 1
0
 public IActionResult Create([FromBody] Robot value)
 {
     return(new WebApiPost <Robot>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value)),
                                   operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null));
 }
Ejemplo n.º 2
0
 public IActionResult Create([FromBody] Robot value) =>
 new WebApiPost <Robot>(this, () => _manager.CreateAsync(WebApiActionBase.Value(value)),
                        operationType: OperationType.Create, statusCode: HttpStatusCode.Created, alternateStatusCode: null, locationUri: (r) => new Uri($"/api/v1/robots/{r.Id}", UriKind.Relative));