示例#1
0
        public WebMasterTypeViewModel Add(WebMasterTypeViewModel WebMasterTypeViewModel)
        {
            var webMasterType = Mapper.Map <WebMasterTypeViewModel, WebMasterType>(WebMasterTypeViewModel);

            _webMasterTypeRepository.Add(webMasterType);
            _unitOfWork.Commit();
            return(WebMasterTypeViewModel);
        }
示例#2
0
        public void Update(WebMasterTypeViewModel WebMasterTypeViewModel)
        {
            var temp = _webMasterTypeRepository.FindById(WebMasterTypeViewModel.KeyId);

            if (temp != null)
            {
                temp.WebMasterTypeName = WebMasterTypeViewModel.WebMasterTypeName;
            }
        }