private List <BeltVM> BeltList2BeltVMList(List <Belt> beltList) { List <BeltVM> BeltVMList = new List <BeltVM>(); foreach (Belt belt in beltList) { BeltVM beltVM = new BeltVM(); beltVM.belt = belt; BeltVMList.Add(beltVM); } return(BeltVMList); }
public ActionResult UpdateBelt([FromBody] BeltVM value) { _warriorAppService.UpdateBelt(value); return(Response()); }
public ActionResult AddBelt([FromBody] BeltVM value) { _warriorAppService.AddBelt(value); return(Response("", value)); }
public void UpdateBelt(BeltVM value) { var data = _mapper.Map <BeltUpdateCommand>(value); _writeData.UpdateBelt(data); }
public void AddBelt(BeltVM value) { var data = _mapper.Map <BeltAddCommand>(value); _writeData.AddBelt(data); }
public async Task <HttpResponseMessage> UpdateBelt(BeltVM value) { var url = $"{_baseUrl}/UpdateBelt"; return(await _client.PutAsJson(url, value)); }
public async Task <ActionResult> UpdateBelt([FromBody] BeltVM value) { var response = await _warriorService.UpdateBelt(value); return(Ok()); }
public async Task <ActionResult> AddBelt([FromBody] BeltVM value) { var response = await _warriorService.AddBelt(value); return(Created("", value)); }