/// <summary>
        /// Gets the user registrations by identifier.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        /// <returns></returns>
        /// <exception cref="ApplicationException">Repository UserRegistrations</exception>
        public IList <IUserRegistration> GetUserRegistrationsById(int userId)
        {
            try
            {
                using (var dbContext = (PitalyticsEntities)this.dbContextFactory.GetDbContext())
                {
                    var list = AccountQueries.GetSystemAdminUsers(dbContext, userId).ToList();

                    var user = new UserRegistrationModel()
                    {
                        UserRegistrationId = userId
                    };
                    var userValue = list.FirstOrDefault(x => x.UserRegistrationId == userId);
                    list.Remove(userValue);
                    return(list);
                }
            }
            catch (Exception e)
            {
                throw new ApplicationException("Repository UserRegistrations", e);
            }
        }