public IHttpActionResult Put(UpdateRankViewModel modifiedModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _service.Update(_mapper.Map <Rank>(modifiedModel));
            return(Ok());
        }
示例#2
0
        public IActionResult Update([FromQuery(Name = "symbol")] string symbol, [FromQuery(Name = "amount")] double amount)
        {
            var res = rankService.Update(symbol, amount);

            return(Ok(new { success = res }));
        }