Exemplo n.º 1
0
        public string UserLogin(string userName, string password)
        {
            if (_proxy.CheckIfUserExistsInDatabase(userName))
            {
                TOKEN token = new TOKEN();
                token.Login = userName;
                token.UserToken = Guid.NewGuid().ToString();
                token.Is_Active = true;

                return _proxy.AddNewTokenToDatabase(token);
            }
            else
            {
                return "User is not registered";
            }
        }
		private void detach_TOKENs(TOKEN entity)
		{
			this.SendPropertyChanging();
			entity.USER = null;
		}
 partial void DeleteTOKEN(TOKEN instance);
		private void attach_TOKENs(TOKEN entity)
		{
			this.SendPropertyChanging();
			entity.USER = this;
		}
 partial void UpdateTOKEN(TOKEN instance);
 partial void InsertTOKEN(TOKEN instance);