Question

I need to get all of users with their Ids whose are created by orchard admin panel. Now I need all list and I will use it in another service.

Or, I want to get Orchard user table "[Orchard_Users_UserPartRecord]" from entity framework like this code

public IList<UserAttendance> ShowAllUserAttendance()`enter code here`
{
    using (UserAttendanceDbContext _db = new UserAttendanceDbContext())
    {
        return _db.UserAttendances.ToList();
    }
}

How can I do it?

Thanks, kibria

Was it helpful?

Solution

See following.

var userProfiles = _contentManager.Query<UserPart, UserPartRecord>() .List() .Select(user => ((dynamic) user).ProfilePart) .Select(user => new {user.FirstName, user.LastName});

For more details visit following link. http://orchardprofile.codeplex.com/discussions/271879

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top