Пример #1
0
        public void Update(TViewModel model)
        {
            var entity = Mapper.Map <TViewModel, TBaseModel>(model);

            _service.Update(entity);
            _uow.Commit();
        }
Пример #2
0
 public virtual ActionResult Edit([Bind(Include = "Id,Name")] CustomerViewModel model)
 {
     if (ModelState.IsValid)
     {
         _customerHandler.Update(model.CreateCustomerDomain());
         _customerHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
Пример #3
0
 public virtual ActionResult Edit(ProductViewModel model)
 {
     if (ModelState.IsValid)
     {
         _productHandler.Update(model.CreateProductDomain());
         _productHandler.Commit();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }