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; }
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); }
public void UpdateUserDetails(UserDetails userDetails) { UserDetails.Attach(userDetails); _context.Entry(userDetails).State = EntityState.Modified; }