/// <exception cref="System.Exception"></exception>
        /// <exception cref="System.ArgumentException">Thrown when the parameter was null or invalid</exception>
        public async Task <IdentityResult> AddRolesToAccountAsync(string id, Constants.Roles roles)
        {
            var accessLevels = roles;

            if (String.IsNullOrEmpty(id) || roles == Constants.Roles.Nonexistent)
            {
                throw new ArgumentException("Parameters are required. Id or roles were null or empty");
            }

            var dalUserAccount = await _userManager.FindByIdAsync(id);

            if (dalUserAccount == null)
            {
                throw new Exception("Ef useraccount was null");
            }

            IEnumerable <string> rolesEnumerated = accessLevels.ToString().ToLower().Split(',');

            foreach (var role in rolesEnumerated)
            {
                if (await _roleManager.RoleExistsAsync(role) == false)
                {
                    var roleResult = await _roleManager.CreateAsync(new IdentityRole { Name = role });

                    if (roleResult.Succeeded == false)
                    {
                        var stringBuilder = new StringBuilder();

                        foreach (var error in roleResult.Errors)
                        {
                            stringBuilder.AppendLine(error.Description);
                        }

                        throw new Exception($"Something went wrong while creating the new role(s). {stringBuilder}");
                    }
                }
            }

            var result = await _userManager.AddToRolesAsync(dalUserAccount, rolesEnumerated);

            return(result);
        }
        /// <exception cref="System.Exception"></exception>
        /// <exception cref="System.ArgumentException">Thrown when the parameter was null or invalid</exception>
        public async Task <IdentityResult> RemoveRolesFromAccountAsync(string id, Constants.Roles roles)
        {
            var accessLevels = roles;

            if (String.IsNullOrEmpty(id) || roles == Constants.Roles.Nonexistent)
            {
                throw new ArgumentException("Parameters are required. Id or roles were null or empty");
            }

            var efUserAccount = await _userManager.FindByIdAsync(id);

            if (efUserAccount == null)
            {
                throw new Exception("DALUserAccount was null");
            }

            IEnumerable <string> rolesEnumerated = accessLevels.ToString().Split(',');

            IdentityResult result = await _userManager.RemoveFromRolesAsync(efUserAccount, rolesEnumerated);

            return(result);
        }