Ejemplo n.º 1
0
        public MongoIdentityUser(string userName)
        {
            if (userName == null)
            {
                throw new ArgumentNullException(nameof(userName));
            }

            Id = GenerateId(userName);
            UserName = userName;
            CreatedOn = new Occurrence();

            _claims = new List<MongoUserClaim>();
            _logins = new List<MongoUserLogin>();
        }
Ejemplo n.º 2
0
        public void Delete()
        {
            if (DeletedOn != null)
            {
                throw new InvalidOperationException($"User '{Id}' has already been deleted.");
            }

            DeletedOn = new Occurrence();
        }