Exemple #1
0
        public void ActivateUserDetails(UserDetails _User)
        {
            UserDetails.Attach(_User);
            _context.Entry(_User).Entity.Inactive     = false;
            _context.Entry(_User).Entity.LastModified = System.DateTime.Now;

            _context.Entry(_User).State = EntityState.Modified;
        }
Exemple #2
0
        public virtual bool DeleteUserDetail(string userId)
        {
            var User = _context.UserDetails.Find(userId);

            if (User != null)
            {
                UserDetails.Attach(User);
                User.Inactive     = true;
                User.LastModified = System.DateTime.Now;

                _context.Entry(User).State = EntityState.Modified;
                return(true);
            }

            return(false);
        }
Exemple #3
0
 public void UpdateUserDetails(UserDetails userDetails)
 {
     UserDetails.Attach(userDetails);
     _context.Entry(userDetails).State = EntityState.Modified;
 }