Пример #1
0
        public UserMaster MapToUserDto(InputUserMasterDto userEntity)
        {
            //map common fields
            var user = Mapper.Map <UserMaster>(userEntity);


            return(user);
        }
Пример #2
0
        public int SaveUser(InputUserMasterDto model)
        {
            UserMaster user = new UserMaster();

            user = _userMapper.MapToUserDto(model);
            _context.Users.Add(user);
            _context.SaveChanges();

            return(user.ID);
        }