コード例 #1
0
        public IActionResult Put([FromBody] CardBrandViewModel CardBrandViewModel)
        {
            if (!ModelState.IsValid)
            {
                NotifyModelStateErrors();
                return(Response(CardBrandViewModel));
            }

            _CardBrandAppService.Update(CardBrandViewModel);

            return(Response(CardBrandViewModel));
        }
コード例 #2
0
        public IActionResult Edit(CardBrandViewModel cardBrandViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(cardBrandViewModel));
            }

            _cardBrandAppService.Update(cardBrandViewModel);

            if (IsValidOperation())
            {
                ViewBag.Sucesso = "Card Brand Updated!";
            }

            return(View(cardBrandViewModel));
        }