예제 #1
0
        public PersonViewModel Save(PersonViewModel vm)
        {
            var dto = Mapper.Map <PersonDTO>(vm);

            dto = _personAccessor.Save(dto);
            vm  = Mapper.Map <PersonViewModel>(dto);

            return(vm);
        }
예제 #2
0
        public PersonViewModel Save(PersonViewModel vm)
        {
            var dto = Mapper.Map <PersonDTO>(vm);

            try
            {
                _XmlReader(vm.Biography);
            }
            catch (System.Exception e) { }
            dto = _personAccessor.Save(dto);
            vm  = Mapper.Map <PersonViewModel>(dto);

            return(vm);
        }