public ActionResult Post(ExampleRequestObject requestResource) { var model = new DomainObject(requestResource.SomeValue); _repository.AddDomainObject(model); _repository.SaveChanges(); return(Ok()); }
public async Task <ActionResult> Post(ExampleRequestObject requestResource) { var ret = await _commandHandler.HandleAsync(requestResource, CancellationToken.None); if (ret.HasErrors) { return(new ProblemResult(ret.Error)); } return(Ok()); }
public ActionResult Post(ExampleRequestObject requestResource) #endif { // // SIDE NOTE: // we should be returning a route with id, but // I'm lazy and that's not the point of all this... :/ return(Conflict(new { detail = "Please see errors property for more details", errors = new[] { new { detail = "he userSettings does not exist for the supplied Id/Key.", title = "The request method does not allow this functionality as upsert semantics are not supported." } } } )); // return Ok(new {Id = 1, requestResource.CoolNewValue, requestResource.ValueId}); }
public ActionResult Post(ExampleRequestObject requestResource)