コード例 #1
0
        public static UserLoggedModel ToUserLoggedModel(User userEntity)
        {
            UserLoggedModel userLoggedModel = new UserLoggedModel()
            {
                Nickname = userEntity.Nickname,
                SessionKey = userEntity.SessionKey
            };

            return userLoggedModel;
        }
コード例 #2
0
        public static User ToEntity(UserRegisterModel userModel)
        {
            User userEntity = new User()
            {
                Username = userModel.Username.ToLower(),
                Nickname = userModel.Nickname,
                AuthCode = userModel.AuthCode
            };

            return userEntity;
        }