예제 #1
0
        /// <summary>
        /// Performs an update to the user record changing their status to Enabled
        /// </summary>
        /// <param name="usercode">string user code</param>
        /// <returns># of records updated</returns>
        public int EnableUser(string usercode)
        {
            if (GetUserByCode(usercode) is Pppu user)
            {
                user.PppuStatus = 1;
                _profiledbcontext.Update(user);
                var ret = _profiledbcontext.SaveChanges();
                return(ret);
            }

            return(0);
            //string sqlquery = $@"UPDATE [PPPU] SET PPPU_STATUS = 1 where pppu_code = '{usercode}' and pppu_deletedid = 0";
        }
예제 #2
0
 public void Save()
 {
     _repoContext.SaveChanges();
 }