예제 #1
0
        public void InsertProfileForUser(ProfileDataModel data)
        {
            data.Password = ProfileEncrypter.EncryptPassword(data.Password, data.UserId);

            object sqlParams = new
            {
                @userId      = data.UserId,
                @categoryId  = data.CategoryId,
                @title       = data.Title,
                @website     = data.Website,
                @loginName   = data.LoginName,
                @password    = data.Password,
                @signUpEmail = data.SignUpEmail
            };

            _dataAccess.SaveData(DboNames.spInsertProfileByUser, DboNames.dboNameAzure, sqlParams);
        }
예제 #2
0
        public void UpdateProfile(ProfileDataModel data)
        {
            data.Password = ProfileEncrypter.EncryptPassword(data.Password, data.UserId);

            object sqlParams = new
            {
                @id          = data.Id,
                @categoryId  = data.CategoryId,
                @title       = data.Title,
                @website     = data.Website,
                @loginName   = data.LoginName,
                @password    = data.Password,
                @signUpEmail = data.SignUpEmail,
                @lastUpdated = data.LastUpdated
            };

            _dataAccess.SaveData(DboNames.spUpdateProfile, DboNames.dboNameAzure, sqlParams);
        }