locked
EntityMembersInformation RRS feed

  • Question

  • Hello,

    how to coprrectly use EntityMembersInformation? I tried a EntityMembersGetRequest returning me all the entity-members of the Product Sample_DB. But the EntityMembersInformation.MemberCount Attribute is always 0. However EntityMembers.Members returns the expected result.

    Hier is the code

    Microsoft.MasterDataServices.EntityMembersGetRequest request = new Microsoft.MasterDataServices.EntityMembersGetRequest();
    
    
    
    request.MembersGetCriteria = new Microsoft.MasterDataServices.EntityMembersGetCriteria();
    
    
    
    request.MembersGetCriteria.ModelId = new Microsoft.MasterDataServices.Identifier() { Name = "Product" };
    
    
    
    request.MembersGetCriteria.VersionId = new Microsoft.MasterDataServices.Identifier() { Name = "Version_1" };
    
    
    
    request.MembersGetCriteria.EntityId = new Microsoft.MasterDataServices.Identifier() { Name = "Product" };
    
    
    
     
    
    
    
    //submit the request to the MDS Web Service Client
    
    Microsoft.MasterDataServices.EntityMembersGetResponse response = client.EntityMembersGet(request);
    
    
    
     
    
    
    
    //confirm that members were returned
    
    
    
    // response.EntityMembersInformation.MemberCount returns always 0 <<<<
    
     
    
      System.Collections.ObjectModel.Collection<Microsoft.MasterDataServices.Member> members = response.EntityMembers.Members;
    
    
    
     
    
    
    
     
    
    
    
    

    Thank you for help in advance

    -ujsr

     

    Tuesday, September 14, 2010 11:16 AM

Answers

  • Hello,

    Can you try this:

    request.MembersGetCriteria.MemberReturnOption = MemberReturnOption.DataAndCounts;
    

    Helena Monteiro
    • Marked as answer by ujsr1895 Thursday, September 16, 2010 7:26 AM
    Wednesday, September 15, 2010 2:56 PM

All replies

  • Hello,

    Can you try this:

    request.MembersGetCriteria.MemberReturnOption = MemberReturnOption.DataAndCounts;
    

    Helena Monteiro
    • Marked as answer by ujsr1895 Thursday, September 16, 2010 7:26 AM
    Wednesday, September 15, 2010 2:56 PM
  • Helena,

     

    that's it! Thanks a lot!

     

    ujsr

    Thursday, September 16, 2010 7:26 AM