示例#1
0
        public ActionResult <ValueResponse> Create([FromBody] ValueRequest request)
        {
            var value = valueService.Create(new Value
            {
                Titulo = request.Titulo
            });

            return(CreatedAtRoute("GetValue", new { id = value.Id.ToString() }, new ValueResponse(value)));
        }
示例#2
0
        public ActionResult <Value> Post([FromBody] Value value)
        {
            _valueService.Create(value);

            return(CreatedAtRoute("Getvalue", new { id = value.Id.ToString() }, value));
        }