예제 #1
0
        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 }));
        }