Ejemplo n.º 1
0
        public ActionResult EditClothingType(ClothingTypeDto clothingTypeDto)
        {
            ClothingType clothingType = _session.Load<ClothingType>(clothingTypeDto.Id);

            clothingType = Mapper.Map<ClothingTypeDto, ClothingType>(clothingTypeDto, clothingType);

            _session.Save(clothingType, clothingTypeDto.Id);
            return RedirectToAction("Index");
        }
Ejemplo n.º 2
0
 public ActionResult CreateClothingType(ClothingTypeDto clothingTypeDto)
 {
     ClothingType clothingType = Mapper.Map<ClothingTypeDto, ClothingType>(clothingTypeDto);
     _session.Save(clothingType);
     return RedirectToAction("Index");
 }