Пример #1
0
        public void EditPaymentMethod(PaymentMethodEditViewModel model)
        {
            var paymentMethod = Mapper.Map <Domains.DataObject.PaymentMethod>(model);

            _dbContext.Entry(paymentMethod).State = System.Data.Entity.EntityState.Modified;
            _dbContext.SaveChanges();
        }
Пример #2
0
        public virtual async Task <ActionResult> Edit(PaymentMethodEditViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            model.CreatorID = await GetCurrentUserIdAsync();

            _paymentMethodService.EditPaymentMethod(model);
            return(RedirectToAction(MVC.Home.ActionNames.Index, MVC.Home.Name));
        }