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)); }
public JsonResult Create([FromBody] VMoveAddForm vMove) { var result = moveService.Create(vMove); return(new JsonResult(result)); }