コード例 #1
0
        public async Task <ActionResult <Move> > Create(MoveDto move)
        {
            var newMove = new Move
            {
                Name     = move.Name,
                Attack   = move.Attack,
                Accuracy = move.Accuracy
            };
            var result = await _moveService.Create(newMove);

            return(CreatedAtRoute("GetMove", new { id = result.ID }, newMove));
        }
コード例 #2
0
        public JsonResult Create([FromBody] VMoveAddForm vMove)
        {
            var result = moveService.Create(vMove);

            return(new JsonResult(result));
        }