Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public ActionResult UpdateBelt([FromBody] BeltVM value)
        {
            _warriorAppService.UpdateBelt(value);

            return(Response());
        }
Exemplo n.º 3
0
        public ActionResult AddBelt([FromBody] BeltVM value)
        {
            _warriorAppService.AddBelt(value);

            return(Response("", value));
        }
Exemplo n.º 4
0
        public void UpdateBelt(BeltVM value)
        {
            var data = _mapper.Map <BeltUpdateCommand>(value);

            _writeData.UpdateBelt(data);
        }
Exemplo n.º 5
0
        public void AddBelt(BeltVM value)
        {
            var data = _mapper.Map <BeltAddCommand>(value);

            _writeData.AddBelt(data);
        }
Exemplo n.º 6
0
        public async Task <HttpResponseMessage> UpdateBelt(BeltVM value)
        {
            var url = $"{_baseUrl}/UpdateBelt";

            return(await _client.PutAsJson(url, value));
        }
Exemplo n.º 7
0
        public async Task <ActionResult> UpdateBelt([FromBody] BeltVM value)
        {
            var response = await _warriorService.UpdateBelt(value);

            return(Ok());
        }
Exemplo n.º 8
0
        public async Task <ActionResult> AddBelt([FromBody] BeltVM value)
        {
            var response = await _warriorService.AddBelt(value);

            return(Created("", value));
        }