Trying to get a list of members in a Partial View, but I'm getting a Compilation Error
CS0120:
An object reference is required for the non-static field, method, or
property
'Umbraco.Core.Services.MemberService.GetMembersByMemberType(string)'
But I would love to hear if there is an "easier" or more "standard" way to do it
foreach(var member in ApplicationContext.Current.Services.MemberService.GetMembersByMemberType("Member")){
listMember = Members.GetByEmail(member.Email);
@listMember.GetPropertyValue("customProperty")
}
MemberService.GetMembersByMemberType
Trying to get a list of members in a Partial View, but I'm getting a Compilation Error
CS0120: An object reference is required for the non-static field, method, or property 'Umbraco.Core.Services.MemberService.GetMembersByMemberType(string)'
Reference documentation: http://our.umbraco.org/documentation/Reference/Management-v6/Services/MemberService ;
Umbraco v. 7.4.1
Solved it by doing the following
But I would love to hear if there is an "easier" or more "standard" way to do it
is working on a reply...