Esempio n. 1
0
        private void CompleteUserRole(User user)
        {
            var userRoleCriteria = new UserRoleCriteria();

            userRoleCriteria.UserId = new StringCriteria()
            {
                Equal = user.Id
            };
            var userRoleList = _usersRoleService.FindUserRole(userRoleCriteria);

            if (userRoleList != null)
            {
                foreach (var userRole in userRoleList)
                {
                    user.Role = _rolesService.GetRole(new RoleKey()
                    {
                        Id = userRole.RoleId
                    });
                }
            }
        }