Exemplo n.º 1
0
        private void SaveUserData()
        {
            List <UserOAuthenticationModel> users = new List <UserOAuthenticationModel>();
            UserOAuthenticationModel        userOAuthenticationModel = new UserOAuthenticationModel();

            userOAuthenticationModel.IsAdmin  = true;
            userOAuthenticationModel.UserName = "******";
            userOAuthenticationModel.Password = "******";
            userOAuthenticationModel.UserID   = 1;

            users.Add(userOAuthenticationModel);

            // userOAuthenticationModel = new UserOAuthenticationModel();
            //userOAuthenticationModel.IsAdmin = false;
            //userOAuthenticationModel.UserName = "******";
            //userOAuthenticationModel.Password = "******";
            //userOAuthenticationModel.UserID = 2;
            //users.Add(userOAuthenticationModel);

            foreach (var data in users)
            {
                _authenticationDB.SaveUserData(data);
            }
        }
Exemplo n.º 2
0
 private void SavetStudentData()
 {
     if (_saveAndUpdatestudentDetails != null)
     {
         _studentDB.SaveStudentData(_saveAndUpdatestudentDetails);
         UserOAuthenticationModel userOAuthentication = new UserOAuthenticationModel
         {
             IsAdmin   = false,
             StudentID = _saveAndUpdatestudentDetails.StudentID,
             UserName  = "******" + _saveAndUpdatestudentDetails.StudentID,
             Password  = "******"
         };
         _authenticationDB.SaveUserData(userOAuthentication);
     }
 }