Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ahmed Mohamed 3 posts 83 karma points
    1 week ago
    Ahmed Mohamed
    0

    how to select all member with strong type like (umbraco.web.PublishedModels.Member). i try to get by this code but how to select properties value
    var allmember = services.MemberService.GetMembersByMemberType("member"); note this when i try to use Select(x => x as Umbraco.Web.PublishedModels.Member); all data is null

  • Huw Reddick 495 posts 1467 karma points
    1 week ago
    Huw Reddick
    100

    The MemberService functions return IMember objects, so in your example allmember will be an IEnumerable

    you can get property values from an iMember object by doing

    member.GetValue("propertyAlias")

Please Sign in or register to post replies

Write your reply to:

Draft